questionInfo.vue 34 KB

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