questionInfo.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  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. uni.downloadFile({
  632. url: url,
  633. success: (res) => {
  634. if (res.statusCode === 200) {
  635. const filePath = res.tempFilePath;
  636. uni.saveFile({
  637. tempFilePath: filePath,
  638. success: (res) => {
  639. uni.showToast({
  640. title: '文件已保存:' + res.savedFilePath,
  641. icon: 'none'
  642. });
  643. // 打开文档查看(仅支持Android)
  644. if (plus.os.name === 'Android') {
  645. uni.openDocument({
  646. filePath: res.savedFilePath,
  647. success: () => {
  648. console.log('打开文档成功');
  649. }
  650. });
  651. } else {
  652. uni.showToast({
  653. title: 'iOS系统请自行选择查看方式',
  654. icon: 'none'
  655. });
  656. }
  657. },
  658. fail: () => {
  659. uni.showToast({
  660. title: '保存文件失败',
  661. icon: 'none'
  662. });
  663. }
  664. });
  665. }
  666. },
  667. fail: () => {
  668. uni.showToast({
  669. title: '下载文件失败',
  670. icon: 'none'
  671. });
  672. }
  673. });
  674. },
  675. // 获取上传进度
  676. progress(e) {
  677. console.log('上传进度:', e)
  678. },
  679. // 上传成功
  680. success(e) {
  681. console.log('上传成功')
  682. },
  683. // 上传失败
  684. fail(e) {
  685. console.log('上传失败:', e)
  686. },
  687. onChange(e) {
  688. console.log(e); // 查看选择文件的详细信息
  689. },
  690. deleteFile(e,index2) {
  691. this.questionList[index2].picUrl.splice(e.index, 1)
  692. },
  693. // 获取上传状态
  694. select(e,index2) {
  695. console.log('选择文件:', e)
  696. var _this = this
  697. var i = 0
  698. upload()
  699. function upload() {
  700. if (i >= e.tempFiles.length) {
  701. return;
  702. }
  703. var item = e.tempFiles[i]
  704. e.tempFiles[i].progress = 100
  705. uni.showLoading({
  706. title: "上传中",
  707. mask: true
  708. });
  709. uni.uploadFile({
  710. url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
  711. filePath: item.url,
  712. name: 'file',
  713. formData: {
  714. 'fileName': item.name
  715. },
  716. header: {
  717. 'token': _this.$auth.getUserToken()
  718. },
  719. success: (res) => {
  720. var data = res.data
  721. if (typeof data['error'] != "undefined") {
  722. uni.showToast({
  723. icon: 'none',
  724. title: '上传失败,请联系开发!'
  725. });
  726. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  727. } else {
  728. _this.questionList[index2].picUrl.push({
  729. url: data,
  730. uuid: item.uuid
  731. })
  732. i++;
  733. // _this.$refs.picFile.setProgress(100)
  734. //e.tempFiles[i].progress = 100
  735. console.log(_this.$refs.picFile)
  736. upload()
  737. }
  738. },
  739. fail: () => {
  740. uni.hideLoading();
  741. uni.showToast({
  742. icon: 'none',
  743. title: '上传失败,请联系开发!'
  744. });
  745. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  746. },
  747. complete: function() {
  748. uni.hideLoading();
  749. }
  750. });
  751. }
  752. },
  753. save(){
  754. console.log("交办单位:"+this.checkUserList)
  755. // this.inputForm.des10="";
  756. // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  757. // this.checkinput();
  758. },
  759. pjsave(){
  760. let cansave=true;
  761. for (let i = 0; i < this.questionList.length; i++) {
  762. this.questionList[i].checkUserList="";
  763. if (this.questionList[i].current1 ==undefined||this.questionList[i].current2 ==undefined) {
  764. cansave=false;
  765. }
  766. }
  767. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  768. if(cansave){
  769. uni.showLoading()
  770. loginService.savepj(this.inputForm).then(({
  771. data
  772. }) => {
  773. uni.hideLoading();
  774. uni.showToast({
  775. title: "评价成功!",
  776. icon: "success"
  777. });
  778. uni.redirectTo({
  779. url: '/pages/question/questionList?w=2'
  780. })
  781. }).catch((e) => {
  782. uni.hideLoading();
  783. })
  784. }else{
  785. uni.showToast({
  786. title: "评价意见还未填写!",
  787. icon: "success"
  788. });
  789. }
  790. },
  791. formSubmit: function(e) {
  792. //将交办单位的名称带出
  793. for (let i = 0; i < this.questionList.length; i++) {
  794. if (this.questionList[i].checkUserList != []) {
  795. this.questionList[i].checkUserListName=this.questionList[i].checkUserList.map((value) => {
  796. const item = this.pickerData.find((option) => option.value === value);
  797. return item ? item.label : value; // 如果找不到,返回 value
  798. })
  799. .join(",");
  800. }
  801. this.questionList[i].checkUserList=this.questionList[i].checkUserList.join(",");
  802. //附件处理
  803. this.questionList[i].des6 = [];
  804. //将原先附件放入
  805. if(this.questionList[i].picLists2.length>0){
  806. for (let ai = 0; ai < this.questionList[i].picLists2.length; ai++) {
  807. this.questionList[i].des6.push(this.questionList[i].picLists2[ai].uuid)
  808. }
  809. }
  810. this.questionList[i].picUrl.forEach(item => {
  811. this.questionList[i].des6.push(item.url)
  812. })
  813. this.questionList[i].des6 = this.questionList[i].des6.toString();
  814. }
  815. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  816. this.checkinput();
  817. },
  818. checkinput(){
  819. if(this.hasDuplicateQName(this.questionList)){
  820. uni.showToast({
  821. icon: 'none',
  822. title: '问题名称不能重复!'
  823. });
  824. }else{
  825. uni.showLoading()
  826. loginService.save2OpRecord(this.inputForm).then(({
  827. data
  828. }) => {
  829. uni.hideLoading();
  830. uni.showToast({
  831. title: "提交成功!",
  832. icon: "success"
  833. });
  834. uni.redirectTo({
  835. url: '/pages/question/questionList'
  836. })
  837. }).catch((e) => {
  838. uni.hideLoading();
  839. })
  840. }
  841. },
  842. hasDuplicateQName(array) {
  843. const seen = new Set();
  844. for (const item of array) {
  845. if (seen.has(item.qname)) {
  846. return true; // 找到重复的 qName
  847. }
  848. seen.add(item.qname);
  849. }
  850. return false; // 没有重复的 qName
  851. }
  852. }
  853. }
  854. </script>
  855. <style>
  856. /* .file-title) {
  857. font-size: 17px !important;
  858. } */
  859. input,textarea{
  860. color: #8799a3;
  861. }
  862. .input1{
  863. background-color: #ffffff;
  864. padding: 1upx 40upx;
  865. display: flex;
  866. align-items: center;
  867. padding-top: 20upx;
  868. border-bottom: 1px solid #eee;
  869. }
  870. .input1 .title {
  871. text-align: justify;
  872. padding-right: 30upx;
  873. font-size: 30upx;
  874. position: relative;
  875. height: 60upx;
  876. line-height: 60upx;
  877. border: ;
  878. }
  879. .title2{
  880. width: 75%;
  881. text-align: left;
  882. }
  883. .input2 {
  884. flex: 1;
  885. font-size: 30upx;
  886. color: #555;
  887. padding-right: 20upx;
  888. width: 100%;
  889. }
  890. .uni-input{
  891. }
  892. .textbg{
  893. display: flex;
  894. background-color: white;
  895. padding-top: 29rpx;
  896. }
  897. .text12{
  898. width: 200rpx;
  899. margin-left: 30rpx;
  900. color: #000000;
  901. font-size: 29rpx;
  902. }
  903. .text2{
  904. flex: 1;
  905. color: #000000;
  906. font-size: 30rpx;
  907. padding-bottom: 2rpx;
  908. }
  909. .text22{
  910. flex: 1;
  911. color: #666666;
  912. font-size: 29rpx;
  913. padding-bottom: 2rpx;
  914. align-self: flex-end;
  915. }
  916. .titlebg2{
  917. display: flex;
  918. background-color: white;
  919. padding-left: 22rpx;
  920. padding-top: 35rpx;
  921. padding-bottom: 25rpx;
  922. margin-bottom: 2rpx;
  923. }
  924. .titlet1{
  925. width: 7rpx;
  926. margin-top: 7rpx;
  927. margin-bottom: 7rpx;
  928. background-color: #2752eb;
  929. margin-right: 8rpx;
  930. }
  931. .titlet2{
  932. font-weight: 800;
  933. color: #2752eb;
  934. }
  935. .titlebb{
  936. color: #000000;
  937. font-weight: 800;
  938. padding-left: 40rpx;
  939. background-color: #ffffff;
  940. padding-top: 20rpx;
  941. }
  942. .titlebb2{
  943. color: #000000;
  944. padding-left: 40rpx;
  945. background-color: #ffffff;
  946. padding-top: 20rpx;
  947. }
  948. .flexC{
  949. display: flex;
  950. }
  951. .bt1{
  952. flex:1;
  953. margin: 30rpx;
  954. }
  955. .bt2{
  956. flex:1;
  957. margin: 30rpx;
  958. }
  959. .radiog{
  960. flex:1;
  961. margin: 10rpx;
  962. }
  963. .radiog2{
  964. display: flex;
  965. }
  966. .uni-list-cell{
  967. display: flex;
  968. }
  969. .cu-form-group{
  970. background-color: #ffffff;
  971. padding: 0.5px 22px;
  972. display: flex;
  973. align-items: center;
  974. min-height: 44px;
  975. }
  976. .modal-content {
  977. padding: 20px;
  978. }
  979. .record-item {
  980. background-color: #fff;
  981. border-radius: 10rpx;
  982. padding: 20rpx;
  983. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  984. display: flex;
  985. flex-direction: column;
  986. }
  987. .record-p1{
  988. width: 10px;
  989. height: 10px;
  990. border-radius: 100px;
  991. background-color: rgb(60, 156, 255);
  992. }
  993. .record-p2{
  994. width: 10px;
  995. height: 10px;
  996. border-radius: 100px;
  997. background-color: rgb(150, 151, 153);
  998. }
  999. .record-x1{
  1000. width: 20rpx;
  1001. height: 100%;
  1002. background-color: rgb(150, 151, 153);
  1003. }
  1004. .record-name {
  1005. font-size: 32rpx;
  1006. font-weight: bold;
  1007. margin-bottom: 10rpx;
  1008. margin-left: 10rpx;
  1009. }
  1010. .record-time {
  1011. font-size: 28rpx;
  1012. margin-left: 10rpx;
  1013. color: #666;
  1014. margin-bottom: 10rpx;
  1015. }
  1016. .submit-time {
  1017. font-size: 14px;
  1018. color: #666;
  1019. margin-left: 28rpx;
  1020. position: relative;
  1021. display: flex;
  1022. flex-direction:column;
  1023. }
  1024. .submit-time::before {
  1025. content: '';
  1026. position: absolute;
  1027. left: -10px;
  1028. top: 0;
  1029. height: 100%;
  1030. width: 1px;
  1031. background-color:rgb(150, 151, 153);
  1032. }
  1033. .attachment-item {
  1034. display: flex;
  1035. justify-content: space-between;
  1036. align-items: center;
  1037. margin-bottom: 10px;
  1038. }
  1039. </style>