questionInfo.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '问题诉求情况'">
  4. <block slot="backText">返回</block>
  5. <block slot="content">问题诉求情况</block>
  6. </cu-custom>
  7. <form @submit="formSubmit" class="cu-list menu">
  8. <view class="titlebg2">
  9. <view class="titlet1" ></view>
  10. <view class="titlet2" >企业信息</view>
  11. </view>
  12. <view class="textbg">
  13. <view class="text12">
  14. 企业名称
  15. </view>
  16. <view class="text22">
  17. {{inputForm.name}}
  18. </view>
  19. </view>
  20. <view class="textbg">
  21. <view class="text12">
  22. 属地
  23. </view>
  24. <view class="text22">
  25. {{inputForm.des1}}
  26. </view>
  27. </view>
  28. <view class="textbg">
  29. <view class="text12">
  30. 企业负责人
  31. </view>
  32. <view class="text22">
  33. {{inputForm.lxr}}
  34. </view>
  35. </view>
  36. <view class="textbg">
  37. <view class="text12">
  38. 负责人号码
  39. </view>
  40. <view class="text22">
  41. {{inputForm.phone}}
  42. </view>
  43. </view>
  44. <view style="height: 30rpx;background-color: white;"></view>
  45. <view class="titlebg2" style="margin-top:10rpx ;">
  46. <view class="titlet1" ></view>
  47. <view class="titlet2" >挂钩干部</view>
  48. </view>
  49. <view class="textbg">
  50. <view class="text12">
  51. 姓名
  52. </view>
  53. <view class="text22">
  54. {{inputForm.bz5}}
  55. </view>
  56. </view>
  57. <view style="height: 30rpx;background-color: white;"></view>
  58. <view class="titlebg2" style="margin-top:10rpx ;">
  59. <view class="titlet1" ></view>
  60. <view class="titlet2" >主要问题诉求</view>
  61. </view>
  62. <view v-for="(item, index2) in questionList">
  63. <view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
  64. <view class="titlebb">
  65. 问题{{index2+1}}
  66. </view>
  67. <!-- <icon v-if="index2!=0" @click="del(index2)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon> -->
  68. </view>
  69. <view class="input1">
  70. <view class="title">
  71. 问题名称
  72. </view>
  73. <input v-model="item.qname" placeholder="请填写问题名称" disabled="true" ></input>
  74. </view>
  75. <view class="cu-form-group margin-top">
  76. <view class="title">
  77. 问题类型
  78. </view>
  79. <view class="input2">{{item.qtype||'请选择问题类型'}}</view>
  80. </view>
  81. <view class="cu-form-group margin-top" v-if="item.t1!=''">
  82. <view class="title">
  83. {{item.t1}}
  84. </view>
  85. <input style="width: 200rpx;" v-model="item.gaps" :placeholder="item.t1s" disabled="true"></input>{{item.t1d}}
  86. </view>
  87. <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;">
  88. <view class="title">
  89. 问题描述
  90. </view>
  91. <textarea v-model="item.des" placeholder="请填写问题描述" disabled="true" ></textarea>
  92. </view>
  93. <!-- 挂钩干部 -->
  94. <view class="cu-form-group margin-top" v-if="roleIds=='1910141956174053377'" >
  95. <view class="title">
  96. 问题处理
  97. </view>
  98. <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
  99. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels" :key="item3">
  100. <view>
  101. <radio :value="item3" :checked="index3 === item.current" />
  102. </view>
  103. <view style="padding-left: 15rpx;">{{item3}}</view>
  104. </label>
  105. </radio-group>
  106. </view>
  107. <!-- 大走访办公室 -->
  108. <view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'" >
  109. <view class="title">
  110. 问题处理
  111. </view>
  112. <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
  113. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels2" :key="item3">
  114. <view>
  115. <radio :value="item3" :checked="index3 === item.current" />
  116. </view>
  117. <view style="padding-left: 15rpx;">{{item3}}</view>
  118. </label>
  119. </radio-group>
  120. </view>
  121. <view class="cu-form-group margin-top">
  122. <view class="title">
  123. 预计办结时间
  124. </view>
  125. <picker mode="date" class="title2" @change="(e) => onDateChange(e, index2)" >
  126. <view class="input2">{{item.finishdate||'请选择'}}</view>
  127. </picker>
  128. </view>
  129. <view v-if="showjbdw" class="cu-form-group margin-top" >
  130. <view class="title">
  131. 交办单位
  132. </view>
  133. <zqs-select
  134. class="input2"
  135. :multiple="true"
  136. :list="pickerData"
  137. label-key="label"
  138. value-key="value"
  139. placeholder=" 请选择"
  140. title="请选择交办单位"
  141. clearable
  142. v-model="checkUserList"
  143. @search="searchEvent"
  144. @change="selectChange2"
  145. ></zqs-select>
  146. </view>
  147. <view v-if="showjbdw" class="cu-form-group margin-top" >
  148. <view class="title">
  149. 交办要求
  150. </view>
  151. <textarea v-model="item.delyj" placeholder="请填写交办要求" ></textarea>
  152. </view>
  153. <view v-if="!showjbdw" class="cu-form-group margin-top" >
  154. <view class="title">
  155. 处理建议
  156. </view>
  157. <textarea v-model="item.delyj" placeholder="请填写处理建议" ></textarea>
  158. </view>
  159. <!-- <view class="cu-form-group2 margin-top" style="border-bottom: 3px solid #eee;">
  160. <view class="title">
  161. 附件:
  162. </view>
  163. <button @click="addfj" style="height: 30px;width: 240rpx;margin-left: 55rpx;" class="cu-btn block bg-blue margin-tb-sm lg">+上传附件</button>
  164. </view>
  165. <view v-for="(item3, index3) in item.fj">
  166. <view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
  167. <view class="titlebb">
  168. {{item3.fjname}}
  169. </view>
  170. <icon @click="del(index3)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
  171. </view>
  172. </view> -->
  173. <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;">
  174. <uni-file-picker style="margin-bottom: 10px;" limit="3" ref="picFile" v-model="item.fj"
  175. fileMediatype="all" mode="grid" title="附件上传" :auto-upload="autoUpload" @select="select"
  176. @progress="progress" @success="success" @fail="fail" @delete="deleteFile"
  177. :imageStyles="imageStyles" :disabled="ischeck">
  178. </uni-file-picker>
  179. </view>
  180. <!-- 流程展示 -->
  181. <view v-for="(record, index4) in item.oplist" :key="index4" class="record-item" @click="viewDetails(record)">
  182. <view style="display: flex; flex-direction:row;align-items: center; ">
  183. <view v-if="item.oplist.length!=1" :class="index4 === item.oplist.length - 1 ? 'record-p2' : 'record-p1'"></view>
  184. <view v-if="item.oplist.length==1" class="record-p1"></view>
  185. <text class="record-time">{{ record.opTypeName }}</text>
  186. </view>
  187. <view style="display: flex; flex-direction:row;align-items: center; ">
  188. <text class="submit-time">{{ record.roleName }}-{{ record.des2 }} &nbsp;&nbsp; {{ record.updateDate }}</text>
  189. </view>
  190. </view>
  191. </view>
  192. <!-- <view style="width: 400rpx;margin-left: 20rpx;">
  193. <button @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
  194. </view> -->
  195. <view style="height: 40rpx;"></view>
  196. <view class="flexC" v-if="cansubmit">
  197. <button v-if="roleIds=='38a14f1f42ed424eab4cb5d489596b0d'" @click="save" class="bt1 block margin-tb-sm lg">暂存</button>
  198. <button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
  199. </view>
  200. <view style="height: 40rpx;"></view>
  201. </form>
  202. </view>
  203. </template>
  204. <script>
  205. var graceChecker = require("@/common/graceChecker.js");
  206. import revenueListService from '@/api/revenue/revenueListService'
  207. import loginService from '@/api/auth/loginService.js'
  208. import * as $auth from "../../common/auth"
  209. export default {
  210. components: {
  211. },
  212. data() {
  213. return {
  214. title: '问题诉求情况',
  215. cansubmit: false,
  216. roleIds:'',
  217. inputForm: {
  218. id:'',
  219. name: '',
  220. industry: '',
  221. lxr: '',
  222. phone: '',
  223. bz1: '',
  224. bz2: '',
  225. bz3: '',
  226. bz4: '',
  227. bz5: '',
  228. bz6: '',
  229. des1: '',
  230. des2: '',
  231. des3: '',
  232. des4: '',
  233. des6: '',
  234. des10: '',
  235. },
  236. t1: '可供产品',
  237. t1s: '请填写可供产品',
  238. t2: '可供数量',
  239. t2s: '请填写可供数量',
  240. t3: '详细描述',
  241. t3s: '请填写详细描述',
  242. autoUpload: false,
  243. picLists: [],
  244. picUrl: [],
  245. imageStyles: {
  246. width: 90,
  247. height: 90
  248. },
  249. parkList: [ "用工人才", "资金需求", "土地厂房", "订单及配套", "政策兑现", "创新及品牌", "审批手续", "水电气供应", "安全环保消防", "其他(需详细说明)"],
  250. questionList:[{qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
  251. dels:["办结","反馈大走访活动办","正在办理","难以化解","持续跟踪","提请会办"],
  252. dels2:["办结","交办"],
  253. index:0,
  254. ischeck: false,
  255. showjbdw: false,
  256. checkUserList: [],
  257. importUserId: [],
  258. pickerData: [],
  259. pickerDataOld: [],
  260. selectedValues: []
  261. }
  262. },
  263. onShow() {
  264. this.$auth.checkLogin()
  265. loginService.getDictList({
  266. dictTypeId:"1907700775364263937"
  267. }).then(({data}) => {
  268. this.pickerData = data
  269. this.pickerDataOld = data
  270. //默认第一个选项
  271. //this.checkUserList=this.pickerData[0].value;
  272. }).catch(e => {
  273. })
  274. },
  275. watch: {
  276. value2(val) {
  277. console.log('我是更新后的选中数据', val)
  278. },
  279. },
  280. created() {
  281. },
  282. mounted() {
  283. },
  284. async onLoad(query) {
  285. if(query.ischeck!=undefined&&query.ischeck=='1'){
  286. //查看
  287. this.ischeck=true;
  288. let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
  289. this.inputForm.id = data2.data.id;
  290. this.inputForm.name = data2.data.qyName;
  291. this.inputForm.des1 = data2.data.des1;
  292. this.inputForm.lxr = data2.data.qyFzr;
  293. this.inputForm.phone = data2.data.phone;
  294. this.inputForm.bz5 = data2.data.officer;
  295. this.questionList=data2.data.dzfQuestionDetilDTOList;
  296. //判断是否显示提交,暂存按钮
  297. this.cansubmit
  298. if(data2.data.states=='1'&&data2.data.des1.includes($auth.getUserInfo().loginName)){
  299. this.cansubmit=true;
  300. }
  301. this.roleIds= $auth.getUserInfo().roleIds;
  302. console.log(this.roleIds);
  303. }else{
  304. //新增
  305. let data2 = await loginService.queryByUserName()
  306. this.inputForm = this.recover(this.inputForm, data2.data)
  307. this.inputForm.id="";
  308. }
  309. },
  310. methods: {
  311. //交办单位
  312. selectChange2() {
  313. // 此处为点击的事件
  314. this.pickerData=this.pickerDataOld;
  315. },
  316. searchEvent(val) {
  317. this.pickerData=this.filteredItems(val);
  318. },
  319. filteredItems(searchQuery) {
  320. const query = searchQuery.trim();
  321. if (!query) return this.pickerDataOld;
  322. return this.pickerDataOld.filter(item => {
  323. return item.label.toString().includes(query);
  324. });
  325. },
  326. //交办单位结束
  327. onDateChange(e,index2) {
  328. this.$set(this.questionList[index2], 'finishdate', e.detail.value);
  329. },
  330. radioChange: function(evt,index2) {
  331. //大走访办公室角色时
  332. if(this.roleIds=='1910175386924417025'){
  333. if(evt.detail.value=='办结'){
  334. this.showjbdw=false;
  335. this.questionList[index2].delyj="";
  336. }else if(evt.detail.value=='交办'){
  337. this.showjbdw=true;
  338. this.questionList[index2].delyj="请2日内回应,10内反馈办理结果,如办结请上传加盖公章的书面材料";
  339. }
  340. for (let i = 0; i < this.dels2.length; i++) {
  341. if (this.dels2[i] === evt.detail.value) {
  342. this.questionList[index2].current = i;
  343. break;
  344. }
  345. }
  346. //其他选择
  347. }else{
  348. console.log("选择:"+evt.detail.value);
  349. for (let i = 0; i < this.dels.length; i++) {
  350. if (this.dels[i] === evt.detail.value) {
  351. this.questionList[index2].current = i;
  352. break;
  353. }
  354. }
  355. }
  356. },
  357. addfj(){
  358. },
  359. addp(){
  360. this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
  361. },
  362. del(index2){
  363. this.questionList.splice(index2, 1);
  364. },
  365. bindPickerChange: function(e,index2) {
  366. if(e.detail.value==0){
  367. this.questionList[index2].t1='缺口数';
  368. this.questionList[index2].t1s= '请填写缺口数';
  369. this.questionList[index2].t1d= '人';
  370. }else if(e.detail.value==1){
  371. this.questionList[index2].t1='缺口数';
  372. this.questionList[index2].t1s= '请填写缺口数';
  373. this.questionList[index2].t1d= '万元';
  374. }else if(e.detail.value==2){
  375. this.questionList[index2].t1='缺口数';
  376. this.questionList[index2].t1s= '请填写缺口数';
  377. this.questionList[index2].t1d= '';
  378. }else{
  379. this.questionList[index2].t1='';
  380. this.questionList[index2].t1s= '';
  381. this.questionList[index2].t1d= '';
  382. }
  383. this.questionList[index2].qTypeindex = e.detail.value;
  384. this.questionList[index2].qtype=this.parkList[e.detail.value]
  385. },
  386. // 获取上传进度
  387. progress(e) {
  388. console.log('上传进度:', e)
  389. },
  390. // 上传成功
  391. success(e) {
  392. console.log('上传成功')
  393. },
  394. // 上传失败
  395. fail(e) {
  396. console.log('上传失败:', e)
  397. },
  398. deleteFile(e) {
  399. this.picUrl.splice(e.index, 1)
  400. },
  401. // 获取上传状态
  402. select(e) {
  403. console.log('选择文件:', e)
  404. var _this = this
  405. var i = 0
  406. upload()
  407. function upload() {
  408. if (i >= e.tempFiles.length) {
  409. return;
  410. }
  411. var item = e.tempFiles[i]
  412. uni.showLoading({
  413. title: "上传中",
  414. mask: true
  415. });
  416. uni.uploadFile({
  417. url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
  418. filePath: item.url,
  419. name: 'file',
  420. formData: {
  421. 'fileName': item.name
  422. },
  423. header: {
  424. 'token': _this.$auth.getUserToken()
  425. },
  426. success: (res) => {
  427. var data = res.data
  428. if (typeof data['error'] != "undefined") {
  429. uni.showToast({
  430. icon: 'none',
  431. title: '上传失败,请联系开发!'
  432. });
  433. _this.$refs.picFile.clearFiles(_this.picLists.length)
  434. } else {
  435. _this.picUrl.push({
  436. url: data,
  437. uuid: item.uuid
  438. })
  439. i++;
  440. upload()
  441. }
  442. },
  443. fail: () => {
  444. uni.hideLoading();
  445. uni.showToast({
  446. icon: 'none',
  447. title: '上传失败,请联系开发!'
  448. });
  449. _this.$refs.picFile.clearFiles(_this.picLists.length)
  450. },
  451. complete: function() {
  452. uni.hideLoading();
  453. }
  454. });
  455. }
  456. },
  457. save(){
  458. console.log("交办单位:"+this.checkUserList)
  459. // this.inputForm.des10="";
  460. // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  461. // this.checkinput();
  462. },
  463. formSubmit: function(e) {
  464. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  465. this.checkinput();
  466. },
  467. checkinput(){
  468. if(this.hasDuplicateQName(this.questionList)){
  469. uni.showToast({
  470. icon: 'none',
  471. title: '问题名称不能重复!'
  472. });
  473. }else{
  474. uni.showLoading()
  475. loginService.save2OpRecord(this.inputForm).then(({
  476. data
  477. }) => {
  478. uni.hideLoading();
  479. uni.showToast({
  480. title: "提交成功!",
  481. icon: "success"
  482. });
  483. uni.navigateTo({
  484. url: '/pages/question/questionList'
  485. })
  486. }).catch((e) => {
  487. uni.hideLoading();
  488. })
  489. }
  490. },
  491. hasDuplicateQName(array) {
  492. const seen = new Set();
  493. for (const item of array) {
  494. if (seen.has(item.qname)) {
  495. return true; // 找到重复的 qName
  496. }
  497. seen.add(item.qname);
  498. }
  499. return false; // 没有重复的 qName
  500. }
  501. }
  502. }
  503. </script>
  504. <style>
  505. /* .file-title) {
  506. font-size: 17px !important;
  507. } */
  508. input,textarea{
  509. color: #8799a3;
  510. }
  511. .input1{
  512. background-color: #ffffff;
  513. padding: 1upx 40upx;
  514. display: flex;
  515. align-items: center;
  516. padding-top: 20upx;
  517. border-bottom: 1px solid #eee;
  518. }
  519. .input1 .title {
  520. text-align: justify;
  521. padding-right: 30upx;
  522. font-size: 30upx;
  523. position: relative;
  524. height: 60upx;
  525. line-height: 60upx;
  526. border: ;
  527. }
  528. .title2{
  529. width: 75%;
  530. text-align: left;
  531. }
  532. .input2 {
  533. flex: 1;
  534. font-size: 30upx;
  535. color: #555;
  536. padding-right: 20upx;
  537. width: 500rpx;
  538. }
  539. .uni-input{
  540. }
  541. .textbg{
  542. display: flex;
  543. background-color: white;
  544. padding-top: 29rpx;
  545. }
  546. .text12{
  547. width: 200rpx;
  548. margin-left: 30rpx;
  549. color: #000000;
  550. font-size: 29rpx;
  551. }
  552. .text2{
  553. flex: 1;
  554. color: #000000;
  555. font-size: 30rpx;
  556. padding-bottom: 2rpx;
  557. }
  558. .text22{
  559. flex: 1;
  560. color: #666666;
  561. font-size: 29rpx;
  562. padding-bottom: 2rpx;
  563. align-self: flex-end;
  564. }
  565. .titlebg2{
  566. display: flex;
  567. background-color: white;
  568. padding-left: 22rpx;
  569. padding-top: 35rpx;
  570. padding-bottom: 25rpx;
  571. margin-bottom: 2rpx;
  572. }
  573. .titlet1{
  574. width: 7rpx;
  575. margin-top: 7rpx;
  576. margin-bottom: 7rpx;
  577. background-color: #2752eb;
  578. margin-right: 8rpx;
  579. }
  580. .titlet2{
  581. font-weight: 800;
  582. color: #2752eb;
  583. }
  584. .titlebb{
  585. color: #000000;
  586. font-weight: 800;
  587. padding-left: 40rpx;
  588. background-color: #ffffff;
  589. padding-top: 20rpx;
  590. }
  591. .flexC{
  592. display: flex;
  593. }
  594. .bt1{
  595. flex:1;
  596. margin: 30rpx;
  597. }
  598. .bt2{
  599. flex:1;
  600. margin: 30rpx;
  601. }
  602. .radiog{
  603. flex:1;
  604. margin: 10rpx;
  605. }
  606. .uni-list-cell{
  607. display: flex;
  608. }
  609. .cu-form-group2{
  610. background-color: #ffffff;
  611. padding: 0.5px 22px;
  612. display: flex;
  613. align-items: center;
  614. min-height: 44px;
  615. }
  616. .modal-content {
  617. padding: 20px;
  618. }
  619. .record-item {
  620. background-color: #fff;
  621. border-radius: 10rpx;
  622. padding: 20rpx;
  623. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  624. display: flex;
  625. flex-direction: column;
  626. }
  627. .record-p1{
  628. width: 10px;
  629. height: 10px;
  630. border-radius: 100px;
  631. background-color: rgb(60, 156, 255);
  632. }
  633. .record-p2{
  634. width: 10px;
  635. height: 10px;
  636. border-radius: 100px;
  637. background-color: rgb(150, 151, 153);
  638. }
  639. .record-x1{
  640. width: 20rpx;
  641. height: 100%;
  642. background-color: rgb(150, 151, 153);
  643. }
  644. .record-name {
  645. font-size: 32rpx;
  646. font-weight: bold;
  647. margin-bottom: 10rpx;
  648. margin-left: 10rpx;
  649. }
  650. .record-time {
  651. font-size: 28rpx;
  652. margin-left: 10rpx;
  653. color: #666;
  654. margin-bottom: 10rpx;
  655. }
  656. .submit-time {
  657. font-size: 14px;
  658. color: #666;
  659. margin-left: 28rpx;
  660. position: relative;
  661. }
  662. .submit-time::before {
  663. content: '';
  664. position: absolute;
  665. left: -10px;
  666. top: 0;
  667. height: 100%;
  668. width: 1px;
  669. background-color:rgb(150, 151, 153);
  670. }
  671. </style>