questionInfo2.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-blue" :isBack="true" >
  4. <block slot="backText">返回</block>
  5. <block slot="content">{{title}}</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.qySd}}
  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" >
  88. <view class="title">
  89. 问题描述
  90. </view>
  91. <textarea v-model="item.des" placeholder="请填写问题描述" disabled="true" ></textarea>
  92. </view>
  93. <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;" v-if="item.des8">
  94. <view class="title">
  95. 涉及单位
  96. </view>
  97. <view class="input2">{{item.des8||''}}</view>
  98. </view>
  99. <!-- 挂钩干部 -->
  100. <view class="cu-form-group margin-top" v-if="roleIds=='1915280292672946177'" >
  101. <view class="title">
  102. 问题处理
  103. </view>
  104. <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
  105. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels" :key="item3">
  106. <view>
  107. <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit" />
  108. </view>
  109. <view style="padding-left: 15rpx;">{{item3}}</view>
  110. </label>
  111. </radio-group>
  112. </view>
  113. <!-- 大走访办公室 -->
  114. <view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'" >
  115. <view class="title">
  116. 问题处理
  117. </view>
  118. <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
  119. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels2" :key="item3">
  120. <view>
  121. <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit"/>
  122. </view>
  123. <view style="padding-left: 15rpx;">{{item3}}</view>
  124. </label>
  125. </radio-group>
  126. </view>
  127. <!-- 交办部门 -->
  128. <view class="cu-form-group margin-top" v-if="roleIds=='1910175949166673921'" >
  129. <view class="title">
  130. 问题处理
  131. </view>
  132. <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
  133. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels3" :key="item3">
  134. <view>
  135. <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit"/>
  136. </view>
  137. <view style="padding-left: 15rpx;">{{item3}}</view>
  138. </label>
  139. </radio-group>
  140. </view>
  141. <!-- 挂钩干部或大走访办公室或交办部门 -->
  142. <view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921'" >
  143. <view class="title">
  144. 预计办结时间
  145. </view>
  146. <picker mode="date" class="title2" @change="(e) => onDateChange(e, index2)" v-if="item.cansubmit" >
  147. <view class="input2">{{item.finishdate||'请选择'}}</view>
  148. </picker>
  149. <view class="input2" v-if="!item.cansubmit">{{item.finishdate||'请选择'}}</view>
  150. </view>
  151. <view v-if="item.showjbdw" class="cu-form-group margin-top" >
  152. <view class="title">
  153. 交办单位
  154. </view>
  155. <zqs-select
  156. class="input2"
  157. :multiple="true"
  158. :list="pickerData"
  159. label-key="label"
  160. value-key="value"
  161. placeholder=" 请选择"
  162. title="请选择交办单位"
  163. clearable
  164. v-model="item.checkUserList"
  165. @search="searchEvent"
  166. @change="selectChange2"
  167. ></zqs-select>
  168. </view>
  169. <view v-if="item.showjbdw2" class="cu-form-group margin-top" >
  170. <view class="title">
  171. 交办单位
  172. </view>
  173. <view class="input2" >{{item.des2||'请选择'}}</view>
  174. </view>
  175. <view class="cu-form-group margin-top" v-if="(roleIds=='1910175386924417025'||roleIds=='1915280292672946177')&&item.showjbdw">
  176. <view class="title">
  177. 交办要求
  178. </view>
  179. <textarea v-model="item.delyj" placeholder="请填写交办要求" ></textarea>
  180. </view>
  181. <view class="cu-form-group margin-top" v-if="(roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921')&&!item.showjbdw">
  182. <view class="title">
  183. 处理建议
  184. </view>
  185. <textarea v-model="item.delyj" placeholder="请填写处理建议" :disabled="!item.cansubmit" ></textarea>
  186. </view>
  187. <!-- <view class="cu-form-group2 margin-top" style="border-bottom: 3px solid #eee;">
  188. <view class="title">
  189. 附件:
  190. </view>
  191. <button @click="addfj" style="height: 30px;width: 240rpx;margin-left: 55rpx;" class="cu-btn block bg-blue margin-tb-sm lg">+上传附件</button>
  192. </view>
  193. <view v-for="(item3, index3) in item.fj">
  194. <view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
  195. <view class="titlebb">
  196. {{item3.fjname}}
  197. </view>
  198. <icon @click="del(index3)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
  199. </view>
  200. </view> -->
  201. <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;" v-if="roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921'">
  202. <uni-file-picker style="margin-bottom: 10px;" limit="9" ref="picFile" v-model="item.picLists"
  203. fileMediatype="all" mode="grid" title="附件上传" :auto-upload="autoUpload" @select="(e) => select(e, index2)"
  204. @progress="progress" @success="success" @fail="fail" @change="onChange" @delete="(e) => deleteFile(e, index2)"
  205. :imageStyles="imageStyles" :disabled="!item.cansubmit">
  206. </uni-file-picker>
  207. </view>
  208. <!-- 流程展示 -->
  209. <view v-for="(record, index4) in item.oplist" :key="index4" class="record-item" @click="viewDetails(record)" style="border-bottom: 2px solid #eee;">
  210. <view style="display: flex; flex-direction:row;align-items: center; ">
  211. <view v-if="item.oplist.length!=1" :class="index4 === item.oplist.length - 1 ? 'record-p2' : 'record-p1'"></view>
  212. <view v-if="item.oplist.length==1" class="record-p1"></view>
  213. <text class="record-time">{{ record.opTypeName }}</text>
  214. </view>
  215. <view style="display: flex; flex-direction:row;align-items: center; ">
  216. <view class="submit-time">
  217. <text v-if="record.des6!=''&&record.des6!=undefined" >处理建议:{{ record.des6 }}</text>
  218. <text v-if="record.des5!=''&&record.des5!=undefined" >预计办结时间:{{ record.des5 }}</text>
  219. <text >{{ record.roleName }}-{{ record.des2 }} &nbsp;&nbsp; {{ record.updateDate }}</text>
  220. </view>
  221. </view>
  222. </view>
  223. <view v-if="canpj">
  224. <view class="cu-form-group margin-top" >
  225. <view class="title" style="color: #3c9cff;">
  226. 企业主要负责人知晓情况:
  227. </view>
  228. <radio-group @change="(e) => radioChange2(e, index2,1)" class="radiog radiog2">
  229. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels4" :key="item3">
  230. <view>
  231. <radio :value="item3" :checked="index3 === item.current" />
  232. </view>
  233. <view style="padding-left: 15rpx;place-self: center;padding-right: 18rpx;">{{item3}}</view>
  234. </label>
  235. </radio-group>
  236. </view>
  237. <view class="cu-form-group margin-top" >
  238. <view class="title" style="padding-right: 0;color: #3c9cff;">
  239. 满意度评价:
  240. </view>
  241. <radio-group @change="(e) => radioChange2(e, index2,2)" class="radiog radiog2">
  242. <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels5" :key="item3">
  243. <view>
  244. <radio :value="item3" :checked="index3 === item.current" />
  245. </view>
  246. <view style="padding-left: 5rpx;place-self: center;padding-right: 9rpx;">{{item3}}</view>
  247. </label>
  248. </radio-group>
  249. </view>
  250. <view class="cu-form-group margin-top" v-if="item.showpjedit">
  251. <view class="title">
  252. 说明
  253. </view>
  254. <textarea v-model="item.delyj" placeholder="请填写说明" ></textarea>
  255. </view>
  256. </view>
  257. <view style="border-bottom: 8px solid #eee;">
  258. </view>
  259. </view>
  260. <!-- <view style="width: 400rpx;margin-left: 20rpx;">
  261. <button @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
  262. </view> -->
  263. <view style="height: 40rpx;"></view>
  264. <view class="flexC" v-if="cansubmit">
  265. <button v-if="roleIds=='38a14f1f42ed424eab4cb5d489596b0d'" @click="save" class="bt1 block margin-tb-sm lg">暂存</button>
  266. <button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
  267. </view>
  268. <view class="flexC" v-if="canpj">
  269. <button @click="pjsave" class="bt1 cu-btn block bg-blue margin-tb-sm lg">立即评价</button>
  270. </view>
  271. <view style="height: 40rpx;"></view>
  272. </form>
  273. </view>
  274. </template>
  275. <script>
  276. var graceChecker = require("@/common/graceChecker.js");
  277. import revenueListService from '@/api/revenue/revenueListService'
  278. import loginService from '@/api/auth/loginService.js'
  279. import * as $auth from "../../common/auth"
  280. export default {
  281. components: {
  282. },
  283. data() {
  284. return {
  285. title: '问题诉求情况',
  286. cansubmit: false,
  287. canpj:false,
  288. roleIds:'',
  289. uid:'',
  290. inputForm: {
  291. id:'',
  292. name: '',
  293. industry: '',
  294. lxr: '',
  295. phone: '',
  296. bz1: '',
  297. bz2: '',
  298. bz3: '',
  299. bz4: '',
  300. bz5: '',
  301. bz6: '',
  302. des1: '',
  303. des2: '',
  304. des3: '',
  305. des4: '',
  306. des6: '',
  307. des10: '',
  308. },
  309. t1: '可供产品',
  310. t1s: '请填写可供产品',
  311. t2: '可供数量',
  312. t2s: '请填写可供数量',
  313. t3: '详细描述',
  314. t3s: '请填写详细描述',
  315. autoUpload: false,
  316. imageStyles: {
  317. width: 90,
  318. height: 90
  319. },
  320. parkList: [ "用工人才", "资金需求", "土地厂房", "订单及配套", "政策兑现", "创新及品牌", "审批手续", "水电气供应", "安全环保消防", "其他(需详细说明)"],
  321. questionList:[{qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""}],
  322. dels:["办结","反馈大走访活动办","正在办理","难以化解","持续跟踪","提请会办"],
  323. dels2:["办结","交办"],
  324. dels3:["办结","正在办理","难以化解","持续跟踪","提请会办"],
  325. dels4:["是","否"],
  326. dels5:["非常满意","满意","不满意"],
  327. index:0,
  328. ischeck: false,
  329. importUserId: [],
  330. pickerData: [],
  331. pickerDataOld: [],
  332. selectedValues: []
  333. }
  334. },
  335. computed: {
  336. // 动态计算选中的 label
  337. selectedLabels() {
  338. return this.item.checkUserList
  339. .map((value) => {
  340. const item = this.pickerData.find((option) => option.value === value);
  341. return item ? item.label : value; // 如果找不到,返回 value
  342. })
  343. .join(", ");
  344. },
  345. },
  346. onShow() {
  347. this.$auth.checkLogin()
  348. loginService.getDictList({
  349. dictTypeId:"1907700775364263937"
  350. }).then(({data}) => {
  351. this.pickerData = data
  352. this.pickerDataOld = data
  353. //默认第一个选项
  354. //this.checkUserList=this.pickerData[0].value;
  355. }).catch(e => {
  356. })
  357. },
  358. watch: {
  359. value2(val) {
  360. console.log('我是更新后的选中数据', val)
  361. },
  362. },
  363. created() {
  364. },
  365. mounted() {
  366. },
  367. async onLoad(query) {
  368. this.uid= $auth.getUserInfo().id;
  369. this.roleIds= $auth.getUserInfo().roleIds;
  370. if(query.ischeck!=undefined){
  371. //查看
  372. this.ischeck=true;
  373. let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
  374. this.inputForm.id = data2.data.id;
  375. this.inputForm.name = data2.data.qyName;
  376. this.inputForm.qySd = data2.data.qySd;
  377. this.inputForm.lxr = data2.data.qyFzr;
  378. this.inputForm.phone = data2.data.phone;
  379. this.inputForm.bz5 = data2.data.officer;
  380. //判断是否显示提交,暂存按钮
  381. if(data2.data.states=='1'&&data2.data.des1.includes($auth.getUserInfo().loginName)){
  382. this.cansubmit=true;
  383. }
  384. //将流程的最后一步设置到查看(问题处理,预计办结时间,处理建议)
  385. for (let i = 0; i < data2.data.dzfQuestionDetilDTOList.length; i++) {
  386. let opsize=data2.data.dzfQuestionDetilDTOList[i].oplist.length;
  387. data2.data.dzfQuestionDetilDTOList[i].showpjedit=false
  388. for (let j = 0; j < opsize; j++) {
  389. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  390. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
  391. //当前登录人
  392. if (data2.data.dzfQuestionDetilDTOList[i].oplist[j].createBy.id === this.uid) {
  393. //问题处理
  394. console.log("问题:"+data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType)
  395. if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='3'){
  396. data2.data.dzfQuestionDetilDTOList[i].current=0
  397. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  398. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
  399. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='4'){
  400. data2.data.dzfQuestionDetilDTOList[i].current=1
  401. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='5'){
  402. //挂钩干部
  403. if(this.roleIds=='1915280292672946177'){
  404. data2.data.dzfQuestionDetilDTOList[i].current=2
  405. //交办部门
  406. }else{
  407. data2.data.dzfQuestionDetilDTOList[i].current=1
  408. }
  409. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='6'){
  410. //挂钩干部
  411. if(this.roleIds=='1915280292672946177'){
  412. data2.data.dzfQuestionDetilDTOList[i].current=3
  413. //交办部门
  414. }else{
  415. data2.data.dzfQuestionDetilDTOList[i].current=2
  416. }
  417. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='7'){
  418. //挂钩干部
  419. if(this.roleIds=='1915280292672946177'){
  420. data2.data.dzfQuestionDetilDTOList[i].current=4
  421. //交办部门
  422. }else{
  423. data2.data.dzfQuestionDetilDTOList[i].current=3
  424. }
  425. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='8'){
  426. //挂钩干部
  427. if(this.roleIds=='1915280292672946177'){
  428. data2.data.dzfQuestionDetilDTOList[i].current=5
  429. //交办部门
  430. }else{
  431. data2.data.dzfQuestionDetilDTOList[i].current=4
  432. }
  433. }
  434. //大走访办公室角色
  435. else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='9'){
  436. data2.data.dzfQuestionDetilDTOList[i].current=1
  437. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=true;
  438. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  439. }
  440. //处理建议
  441. data2.data.dzfQuestionDetilDTOList[i].delyj=data2.data.dzfQuestionDetilDTOList[i].oplist[j].des6
  442. }
  443. }
  444. //办结时间就是显示最后一条处理意见的办结时间
  445. if(data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=undefined&&data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=''){
  446. data2.data.dzfQuestionDetilDTOList[i].finishdate=data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5
  447. }
  448. //每条问题是否需要提交
  449. if(data2.data.dzfQuestionDetilDTOList[i].des1!=undefined){
  450. let nextuser=data2.data.dzfQuestionDetilDTOList[i].des1+",";
  451. if(nextuser.includes($auth.getUserInfo().loginName+",")){
  452. data2.data.dzfQuestionDetilDTOList[i].cansubmit=true;
  453. }else{
  454. data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
  455. }
  456. }else{
  457. data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
  458. }
  459. data2.data.dzfQuestionDetilDTOList[i].checkUserList=[];
  460. data2.data.dzfQuestionDetilDTOList[i].picLists=[];
  461. data2.data.dzfQuestionDetilDTOList[i].picUrl=[];
  462. //初始化附件
  463. if (data2.data.dzfQuestionDetilDTOList[i].des6 != null) {
  464. var list = data2.data.dzfQuestionDetilDTOList[i].des6.split(",")
  465. list.forEach(item => {
  466. data2.data.dzfQuestionDetilDTOList[i].picUrl.push({
  467. 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
  468. 'uuid': "http://47.97.69.114:8089/yd_qycpfbWeb"+item
  469. })
  470. let aa=item.split("&name=")
  471. data2.data.dzfQuestionDetilDTOList[i].picLists.push({
  472. 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
  473. 'uuid': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
  474. 'name': aa[1]
  475. })
  476. })
  477. }
  478. }
  479. this.questionList=data2.data.dzfQuestionDetilDTOList;
  480. console.log(this.questionList)
  481. if(query.ischeck=='2'){
  482. this.title="诉求办理评价";
  483. this.canpj=true;
  484. }
  485. }else{
  486. //新增
  487. let data2 = await loginService.queryByUserName()
  488. this.inputForm = this.recover(this.inputForm, data2.data)
  489. this.inputForm.id="";
  490. }
  491. },
  492. methods: {
  493. //交办单位
  494. selectChange2() {
  495. // 此处为点击的事件
  496. this.pickerData=this.pickerDataOld;
  497. },
  498. searchEvent(val) {
  499. this.pickerData=this.filteredItems(val);
  500. },
  501. filteredItems(searchQuery) {
  502. const query = searchQuery.trim();
  503. if (!query) return this.pickerDataOld;
  504. return this.pickerDataOld.filter(item => {
  505. return item.label.toString().includes(query);
  506. });
  507. },
  508. //交办单位结束
  509. onDateChange(e,index2) {
  510. this.$set(this.questionList[index2], 'finishdate', e.detail.value);
  511. },
  512. radioChange: function(evt,index2) {
  513. //大走访办公室角色时
  514. if(this.roleIds=='1910175386924417025'){
  515. if(evt.detail.value=='办结'){
  516. this.questionList[index2].showjbdw=false;
  517. this.questionList[index2].delyj="";
  518. }else if(evt.detail.value=='交办'){
  519. this.questionList[index2].showjbdw=true;
  520. console.log(this.questionList[index2])
  521. this.questionList[index2].delyj="请2日内回应,10内反馈办理结果,如办结请上传加盖公章的书面材料";
  522. }
  523. for (let i = 0; i < this.dels2.length; i++) {
  524. if (this.dels2[i] === evt.detail.value) {
  525. this.questionList[index2].current = i;
  526. break;
  527. }
  528. }
  529. //挂钩干部
  530. }else if(this.roleIds=='1915280292672946177'){
  531. console.log("选择:"+evt.detail.value);
  532. for (let i = 0; i < this.dels.length; i++) {
  533. if (this.dels[i] === evt.detail.value) {
  534. this.questionList[index2].current = i;
  535. break;
  536. }
  537. }
  538. //交办部门
  539. }else if(this.roleIds=='1910175949166673921'){
  540. console.log("选择:"+evt.detail.value);
  541. for (let i = 0; i < this.dels3.length; i++) {
  542. if (this.dels3[i] === evt.detail.value) {
  543. this.questionList[index2].current = i;
  544. break;
  545. }
  546. }
  547. }
  548. },
  549. radioChange2: function(evt,index2,witch) {
  550. if(evt.detail.value=='非常满意'||evt.detail.value=='满意'){
  551. this.questionList[index2].showpjedit=false;
  552. this.questionList[index2].pjyj="";
  553. }else if(evt.detail.value=='不满意'){
  554. this.questionList[index2].showpjedit=true;
  555. }
  556. if(witch==1){
  557. for (let i = 0; i < this.dels4.length; i++) {
  558. if (this.dels4[i] === evt.detail.value) {
  559. this.questionList[index2].current1 = i;
  560. break;
  561. }
  562. }
  563. }else{
  564. for (let i = 0; i < this.dels5.length; i++) {
  565. if (this.dels5[i] === evt.detail.value) {
  566. this.questionList[index2].current2 = i;
  567. break;
  568. }
  569. }
  570. }
  571. },
  572. addfj(){
  573. },
  574. addp(){
  575. this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
  576. },
  577. del(index2){
  578. this.questionList.splice(index2, 1);
  579. },
  580. bindPickerChange: function(e,index2) {
  581. if(e.detail.value==0){
  582. this.questionList[index2].t1='缺口数';
  583. this.questionList[index2].t1s= '请填写缺口数';
  584. this.questionList[index2].t1d= '人';
  585. }else if(e.detail.value==1){
  586. this.questionList[index2].t1='缺口数';
  587. this.questionList[index2].t1s= '请填写缺口数';
  588. this.questionList[index2].t1d= '万元';
  589. }else if(e.detail.value==2){
  590. this.questionList[index2].t1='缺口数';
  591. this.questionList[index2].t1s= '请填写缺口数';
  592. this.questionList[index2].t1d= '';
  593. }else{
  594. this.questionList[index2].t1='';
  595. this.questionList[index2].t1s= '';
  596. this.questionList[index2].t1d= '';
  597. }
  598. this.questionList[index2].qTypeindex = e.detail.value;
  599. this.questionList[index2].qtype=this.parkList[e.detail.value]
  600. },
  601. // 获取上传进度
  602. progress(e) {
  603. console.log('上传进度:', e)
  604. },
  605. // 上传成功
  606. success(e) {
  607. console.log('上传成功')
  608. },
  609. // 上传失败
  610. fail(e) {
  611. console.log('上传失败:', e)
  612. },
  613. onChange(e) {
  614. console.log(e); // 查看选择文件的详细信息
  615. },
  616. deleteFile(e,index2) {
  617. this.questionList[index2].picUrl.splice(e.index, 1)
  618. },
  619. // 获取上传状态
  620. select(e,index2) {
  621. console.log('选择文件:', e)
  622. var _this = this
  623. var i = 0
  624. upload()
  625. function upload() {
  626. if (i >= e.tempFiles.length) {
  627. return;
  628. }
  629. var item = e.tempFiles[i]
  630. e.tempFiles[i].progress = 100
  631. uni.showLoading({
  632. title: "上传中",
  633. mask: true
  634. });
  635. uni.uploadFile({
  636. url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
  637. filePath: item.url,
  638. name: 'file',
  639. formData: {
  640. 'fileName': item.name
  641. },
  642. header: {
  643. 'token': _this.$auth.getUserToken()
  644. },
  645. success: (res) => {
  646. var data = res.data
  647. if (typeof data['error'] != "undefined") {
  648. uni.showToast({
  649. icon: 'none',
  650. title: '上传失败,请联系开发!'
  651. });
  652. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  653. } else {
  654. _this.questionList[index2].picUrl.push({
  655. url: data,
  656. uuid: item.uuid
  657. })
  658. i++;
  659. // _this.$refs.picFile.setProgress(100)
  660. //e.tempFiles[i].progress = 100
  661. console.log(_this.$refs.picFile)
  662. upload()
  663. }
  664. },
  665. fail: () => {
  666. uni.hideLoading();
  667. uni.showToast({
  668. icon: 'none',
  669. title: '上传失败,请联系开发!'
  670. });
  671. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  672. },
  673. complete: function() {
  674. uni.hideLoading();
  675. }
  676. });
  677. }
  678. },
  679. save(){
  680. console.log("交办单位:"+this.checkUserList)
  681. // this.inputForm.des10="";
  682. // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  683. // this.checkinput();
  684. },
  685. pjsave(){
  686. let cansave=true;
  687. for (let i = 0; i < this.questionList.length; i++) {
  688. this.questionList[i].checkUserList="";
  689. if (this.questionList[i].current1 ==undefined||this.questionList[i].current2 ==undefined) {
  690. cansave=false;
  691. }
  692. }
  693. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  694. if(cansave){
  695. uni.showLoading()
  696. loginService.savepj(this.inputForm).then(({
  697. data
  698. }) => {
  699. uni.hideLoading();
  700. uni.showToast({
  701. title: "评价成功!",
  702. icon: "success"
  703. });
  704. uni.redirectTo({
  705. url: '/pages/question/questionList?w=2'
  706. })
  707. }).catch((e) => {
  708. uni.hideLoading();
  709. })
  710. }else{
  711. uni.showToast({
  712. title: "评价意见还未填写!",
  713. icon: "success"
  714. });
  715. }
  716. },
  717. formSubmit: function(e) {
  718. //将交办单位的名称带出
  719. for (let i = 0; i < this.questionList.length; i++) {
  720. if (this.questionList[i].checkUserList != []) {
  721. this.questionList[i].checkUserListName=this.questionList[i].checkUserList.map((value) => {
  722. const item = this.pickerData.find((option) => option.value === value);
  723. return item ? item.label : value; // 如果找不到,返回 value
  724. })
  725. .join(",");
  726. }
  727. this.questionList[i].checkUserList=this.questionList[i].checkUserList.join(",");
  728. //附件处理
  729. this.questionList[i].des6 = [];
  730. this.questionList[i].picUrl.forEach(item => {
  731. this.questionList[i].des6.push(item.url)
  732. })
  733. this.questionList[i].des6 = this.questionList[i].des6.toString();
  734. }
  735. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  736. this.checkinput();
  737. },
  738. checkinput(){
  739. if(this.hasDuplicateQName(this.questionList)){
  740. uni.showToast({
  741. icon: 'none',
  742. title: '问题名称不能重复!'
  743. });
  744. }else{
  745. uni.showLoading()
  746. loginService.save2OpRecord(this.inputForm).then(({
  747. data
  748. }) => {
  749. uni.hideLoading();
  750. uni.showToast({
  751. title: "提交成功!",
  752. icon: "success"
  753. });
  754. uni.redirectTo({
  755. url: '/pages/question/questionList'
  756. })
  757. }).catch((e) => {
  758. uni.hideLoading();
  759. })
  760. }
  761. },
  762. hasDuplicateQName(array) {
  763. const seen = new Set();
  764. for (const item of array) {
  765. if (seen.has(item.qname)) {
  766. return true; // 找到重复的 qName
  767. }
  768. seen.add(item.qname);
  769. }
  770. return false; // 没有重复的 qName
  771. }
  772. }
  773. }
  774. </script>
  775. <style>
  776. /* .file-title) {
  777. font-size: 17px !important;
  778. } */
  779. input,textarea{
  780. color: #8799a3;
  781. }
  782. .input1{
  783. background-color: #ffffff;
  784. padding: 1upx 40upx;
  785. display: flex;
  786. align-items: center;
  787. padding-top: 20upx;
  788. border-bottom: 1px solid #eee;
  789. }
  790. .input1 .title {
  791. text-align: justify;
  792. padding-right: 30upx;
  793. font-size: 30upx;
  794. position: relative;
  795. height: 60upx;
  796. line-height: 60upx;
  797. border: ;
  798. }
  799. .title2{
  800. width: 75%;
  801. text-align: left;
  802. }
  803. .input2 {
  804. flex: 1;
  805. font-size: 30upx;
  806. color: #555;
  807. padding-right: 20upx;
  808. width: 100%;
  809. }
  810. .uni-input{
  811. }
  812. .textbg{
  813. display: flex;
  814. background-color: white;
  815. padding-top: 29rpx;
  816. }
  817. .text12{
  818. width: 200rpx;
  819. margin-left: 30rpx;
  820. color: #000000;
  821. font-size: 29rpx;
  822. }
  823. .text2{
  824. flex: 1;
  825. color: #000000;
  826. font-size: 30rpx;
  827. padding-bottom: 2rpx;
  828. }
  829. .text22{
  830. flex: 1;
  831. color: #666666;
  832. font-size: 29rpx;
  833. padding-bottom: 2rpx;
  834. align-self: flex-end;
  835. }
  836. .titlebg2{
  837. display: flex;
  838. background-color: white;
  839. padding-left: 22rpx;
  840. padding-top: 35rpx;
  841. padding-bottom: 25rpx;
  842. margin-bottom: 2rpx;
  843. }
  844. .titlet1{
  845. width: 7rpx;
  846. margin-top: 7rpx;
  847. margin-bottom: 7rpx;
  848. background-color: #2752eb;
  849. margin-right: 8rpx;
  850. }
  851. .titlet2{
  852. font-weight: 800;
  853. color: #2752eb;
  854. }
  855. .titlebb{
  856. color: #000000;
  857. font-weight: 800;
  858. padding-left: 40rpx;
  859. background-color: #ffffff;
  860. padding-top: 20rpx;
  861. }
  862. .flexC{
  863. display: flex;
  864. }
  865. .bt1{
  866. flex:1;
  867. margin: 30rpx;
  868. }
  869. .bt2{
  870. flex:1;
  871. margin: 30rpx;
  872. }
  873. .radiog{
  874. flex:1;
  875. margin: 10rpx;
  876. }
  877. .radiog2{
  878. display: flex;
  879. }
  880. .uni-list-cell{
  881. display: flex;
  882. }
  883. .cu-form-group2{
  884. background-color: #ffffff;
  885. padding: 0.5px 22px;
  886. display: flex;
  887. align-items: center;
  888. min-height: 44px;
  889. }
  890. .modal-content {
  891. padding: 20px;
  892. }
  893. .record-item {
  894. background-color: #fff;
  895. border-radius: 10rpx;
  896. padding: 20rpx;
  897. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  898. display: flex;
  899. flex-direction: column;
  900. }
  901. .record-p1{
  902. width: 10px;
  903. height: 10px;
  904. border-radius: 100px;
  905. background-color: rgb(60, 156, 255);
  906. }
  907. .record-p2{
  908. width: 10px;
  909. height: 10px;
  910. border-radius: 100px;
  911. background-color: rgb(150, 151, 153);
  912. }
  913. .record-x1{
  914. width: 20rpx;
  915. height: 100%;
  916. background-color: rgb(150, 151, 153);
  917. }
  918. .record-name {
  919. font-size: 32rpx;
  920. font-weight: bold;
  921. margin-bottom: 10rpx;
  922. margin-left: 10rpx;
  923. }
  924. .record-time {
  925. font-size: 28rpx;
  926. margin-left: 10rpx;
  927. color: #666;
  928. margin-bottom: 10rpx;
  929. }
  930. .submit-time {
  931. font-size: 14px;
  932. color: #666;
  933. margin-left: 28rpx;
  934. position: relative;
  935. display: flex;
  936. flex-direction:column;
  937. }
  938. .submit-time::before {
  939. content: '';
  940. position: absolute;
  941. left: -10px;
  942. top: 0;
  943. height: 100%;
  944. width: 1px;
  945. background-color:rgb(150, 151, 153);
  946. }
  947. </style>