questionInfo.vue 36 KB

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