questionInfo.vue 34 KB

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