questionInfo.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266
  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="roleIds=='1910175386924417025'">
  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.checkUserList
  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. if(data2.data.states=='1'&&data2.data.des1.includes($auth.getUserInfo().loginName)){
  394. this.cansubmit=true;
  395. }
  396. //将流程的最后一步设置到查看(问题处理,预计办结时间,处理建议)
  397. for (let i = 0; i < data2.data.dzfQuestionDetilDTOList.length; i++) {
  398. let opsize=data2.data.dzfQuestionDetilDTOList[i].oplist.length;
  399. data2.data.dzfQuestionDetilDTOList[i].showpjedit=false
  400. for (let j = 0; j < opsize; j++) {
  401. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  402. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
  403. //当前登录人
  404. if (data2.data.dzfQuestionDetilDTOList[i].oplist[j].createBy.id === this.uid) {
  405. //问题处理
  406. console.log("问题:"+data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType)
  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].picLists=[];
  479. data2.data.dzfQuestionDetilDTOList[i].picLists2=[];
  480. data2.data.dzfQuestionDetilDTOList[i].picUrl=[];
  481. //初始化附件
  482. if (data2.data.dzfQuestionDetilDTOList[i].des6 != null) {
  483. var list = data2.data.dzfQuestionDetilDTOList[i].des6.split(",")
  484. list.forEach(item => {
  485. // data2.data.dzfQuestionDetilDTOList[i].picUrl.push({
  486. // 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
  487. // 'uuid': "http://47.97.69.114:8089/yd_qycpfbWeb"+item
  488. // })
  489. let aa=item.split("&name=")
  490. data2.data.dzfQuestionDetilDTOList[i].picLists2.push({
  491. 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
  492. 'uuid': item,
  493. 'name': aa[1]
  494. })
  495. })
  496. }
  497. }
  498. this.questionList=data2.data.dzfQuestionDetilDTOList;
  499. console.log(this.questionList)
  500. if(query.ischeck=='2'){
  501. this.title="诉求办理评价";
  502. this.canpj=true;
  503. }
  504. }else{
  505. //新增
  506. let data2 = await loginService.queryByUserName()
  507. this.inputForm = this.recover(this.inputForm, data2.data)
  508. this.inputForm.id="";
  509. }
  510. },
  511. methods: {
  512. //交办单位
  513. selectChange2() {
  514. // 此处为点击的事件
  515. this.pickerData=this.pickerDataOld;
  516. },
  517. searchEvent(val) {
  518. this.pickerData=this.filteredItems(val);
  519. },
  520. filteredItems(searchQuery) {
  521. const query = searchQuery.trim();
  522. if (!query) return this.pickerDataOld;
  523. return this.pickerDataOld.filter(item => {
  524. return item.label.toString().includes(query);
  525. });
  526. },
  527. //交办单位结束
  528. onDateChange(e,index2) {
  529. this.$set(this.questionList[index2], 'finishdate', e.detail.value);
  530. },
  531. radioChange: function(evt,index2) {
  532. //大走访办公室角色时
  533. if(this.roleIds=='1910175386924417025'){
  534. if(evt.detail.value=='办结'){
  535. this.questionList[index2].showjbdw=false;
  536. this.questionList[index2].delyj="";
  537. }else if(evt.detail.value=='交办'){
  538. this.questionList[index2].showjbdw=true;
  539. console.log(this.questionList[index2])
  540. this.questionList[index2].delyj="请2日内回应,10内反馈办理结果,如办结请上传加盖公章的书面材料";
  541. }
  542. for (let i = 0; i < this.dels2.length; i++) {
  543. if (this.dels2[i] === evt.detail.value) {
  544. this.questionList[index2].current = i;
  545. break;
  546. }
  547. }
  548. //挂钩干部
  549. }else if(this.roleIds=='1915280292672946177'){
  550. console.log("选择:"+evt.detail.value);
  551. for (let i = 0; i < this.dels.length; i++) {
  552. if (this.dels[i] === evt.detail.value) {
  553. this.questionList[index2].current = i;
  554. break;
  555. }
  556. }
  557. //交办部门
  558. }else if(this.roleIds=='1910175949166673921'){
  559. console.log("选择:"+evt.detail.value);
  560. for (let i = 0; i < this.dels3.length; i++) {
  561. if (this.dels3[i] === evt.detail.value) {
  562. this.questionList[index2].current = i;
  563. break;
  564. }
  565. }
  566. }
  567. },
  568. radioChange2: function(evt,index2,witch) {
  569. if(evt.detail.value=='非常满意'||evt.detail.value=='满意'){
  570. this.questionList[index2].showpjedit=false;
  571. this.questionList[index2].pjyj="";
  572. }else if(evt.detail.value=='不满意'){
  573. this.questionList[index2].showpjedit=true;
  574. }
  575. if(witch==1){
  576. for (let i = 0; i < this.dels4.length; i++) {
  577. if (this.dels4[i] === evt.detail.value) {
  578. this.questionList[index2].current1 = i;
  579. break;
  580. }
  581. }
  582. }else{
  583. for (let i = 0; i < this.dels5.length; i++) {
  584. if (this.dels5[i] === evt.detail.value) {
  585. this.questionList[index2].current2 = i;
  586. break;
  587. }
  588. }
  589. }
  590. },
  591. addfj(){
  592. },
  593. addp(){
  594. this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
  595. },
  596. del(index2){
  597. this.questionList.splice(index2, 1);
  598. },
  599. bindPickerChange: function(e,index2) {
  600. if(e.detail.value==0){
  601. this.questionList[index2].t1='缺口数';
  602. this.questionList[index2].t1s= '请填写缺口数';
  603. this.questionList[index2].t1d= '人';
  604. }else if(e.detail.value==1){
  605. this.questionList[index2].t1='缺口数';
  606. this.questionList[index2].t1s= '请填写缺口数';
  607. this.questionList[index2].t1d= '万元';
  608. }else if(e.detail.value==2){
  609. this.questionList[index2].t1='缺口数';
  610. this.questionList[index2].t1s= '请填写缺口数';
  611. this.questionList[index2].t1d= '';
  612. }else{
  613. this.questionList[index2].t1='';
  614. this.questionList[index2].t1s= '';
  615. this.questionList[index2].t1d= '';
  616. }
  617. this.questionList[index2].qTypeindex = e.detail.value;
  618. this.questionList[index2].qtype=this.parkList[e.detail.value]
  619. },
  620. viewAttachment(attachment) {
  621. let aa=this.checkFileTypeByExtension(attachment.url);
  622. if(aa=='Image'){
  623. uni.previewImage({
  624. urls: [attachment.url], // 图片链接列表
  625. indicator: 'number', // 显示页码
  626. loop: true // 是否循环播放
  627. });
  628. }else{
  629. this.downloadFile(attachment.url);
  630. }
  631. },
  632. checkFileTypeByExtension(url) {
  633. const extension = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
  634. if (['jpg', 'jpeg', 'png', 'gif'].includes(extension)) {
  635. return 'Image';
  636. } else if (['doc', 'docx', 'xls', 'xlsx', 'pdf'].includes(extension)) {
  637. return 'Document';
  638. } else {
  639. return 'Unknown';
  640. }
  641. },
  642. downloadFile(url) {
  643. const a = document.createElement('a');
  644. a.href = url; //filePath 这里的地址是 uni.downloadFile 中的返回值里的地址
  645. let aa=url.split("&name=")
  646. a.download = aa[1]; // 可以设置下载文件名,如果是空字符串,则使用服务器端设置的文件名
  647. a.click();
  648. // uni.downloadFile({
  649. // url: url,
  650. // success: (res) => {
  651. // if (res.statusCode === 200) {
  652. // const filePath = res.tempFilePath;
  653. // uni.saveFile({
  654. // tempFilePath: filePath,
  655. // success: (res) => {
  656. // uni.showToast({
  657. // title: '文件已保存:' + res.savedFilePath,
  658. // icon: 'none'
  659. // });
  660. // // 打开文档查看(仅支持Android)
  661. // if (plus.os.name === 'Android') {
  662. // uni.openDocument({
  663. // filePath: res.savedFilePath,
  664. // success: () => {
  665. // console.log('打开文档成功');
  666. // }
  667. // });
  668. // } else {
  669. // uni.showToast({
  670. // title: 'iOS系统请自行选择查看方式',
  671. // icon: 'none'
  672. // });
  673. // }
  674. // },
  675. // fail: () => {
  676. // uni.showToast({
  677. // title: '保存文件失败',
  678. // icon: 'none'
  679. // });
  680. // }
  681. // });
  682. // }
  683. // },
  684. // fail: () => {
  685. // uni.showToast({
  686. // title: '下载文件失败',
  687. // icon: 'none'
  688. // });
  689. // }
  690. // });
  691. },
  692. // 获取上传进度
  693. progress(e) {
  694. console.log('上传进度:', e)
  695. },
  696. // 上传成功
  697. success(e) {
  698. console.log('上传成功')
  699. },
  700. // 上传失败
  701. fail(e) {
  702. console.log('上传失败:', e)
  703. },
  704. onChange(e) {
  705. console.log(e); // 查看选择文件的详细信息
  706. },
  707. deleteFile(e,index2) {
  708. this.questionList[index2].picUrl.splice(e.index, 1)
  709. },
  710. // 获取上传状态
  711. select(e,index2) {
  712. console.log('选择文件:', e)
  713. var _this = this
  714. var i = 0
  715. upload()
  716. function upload() {
  717. if (i >= e.tempFiles.length) {
  718. return;
  719. }
  720. var item = e.tempFiles[i]
  721. e.tempFiles[i].progress = 100
  722. uni.showLoading({
  723. title: "上传中",
  724. mask: true
  725. });
  726. uni.uploadFile({
  727. url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
  728. filePath: item.url,
  729. name: 'file',
  730. formData: {
  731. 'fileName': item.name
  732. },
  733. header: {
  734. 'token': _this.$auth.getUserToken()
  735. },
  736. success: (res) => {
  737. var data = res.data
  738. if (typeof data['error'] != "undefined") {
  739. uni.showToast({
  740. icon: 'none',
  741. title: '上传失败,请联系开发!'
  742. });
  743. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  744. } else {
  745. _this.questionList[index2].picUrl.push({
  746. url: data,
  747. uuid: item.uuid
  748. })
  749. i++;
  750. // _this.$refs.picFile.setProgress(100)
  751. //e.tempFiles[i].progress = 100
  752. console.log(_this.$refs.picFile)
  753. upload()
  754. }
  755. },
  756. fail: () => {
  757. uni.hideLoading();
  758. uni.showToast({
  759. icon: 'none',
  760. title: '上传失败,请联系开发!'
  761. });
  762. _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
  763. },
  764. complete: function() {
  765. uni.hideLoading();
  766. }
  767. });
  768. }
  769. },
  770. del(){
  771. let id=this.inputForm.id;
  772. uni.showModal({
  773. title: '提示',
  774. content: '您确认删除此条问题诉求吗?',
  775. showCancel: true,
  776. success: (res) => {
  777. if (res.confirm) {
  778. loginService.deleteQuestion(id).then(({data})=>{
  779. uni.showToast({
  780. title: data,
  781. icon:"success"
  782. })
  783. uni.redirectTo({
  784. url: '/pages/question/questionList'
  785. })
  786. })
  787. }
  788. }
  789. });
  790. },
  791. save(){
  792. console.log("交办单位:"+this.checkUserList)
  793. // this.inputForm.des10="";
  794. // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  795. // this.checkinput();
  796. },
  797. pjsave(){
  798. let cansave=true;
  799. for (let i = 0; i < this.questionList.length; i++) {
  800. this.questionList[i].checkUserList="";
  801. if (this.questionList[i].current1 ==undefined||this.questionList[i].current2 ==undefined) {
  802. cansave=false;
  803. }
  804. }
  805. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  806. if(cansave){
  807. uni.showLoading()
  808. loginService.savepj(this.inputForm).then(({
  809. data
  810. }) => {
  811. uni.hideLoading();
  812. uni.showToast({
  813. title: "评价成功!",
  814. icon: "success"
  815. });
  816. uni.redirectTo({
  817. url: '/pages/question/questionList?w=2'
  818. })
  819. }).catch((e) => {
  820. uni.hideLoading();
  821. })
  822. }else{
  823. uni.showToast({
  824. title: "评价意见还未填写!",
  825. icon: "success"
  826. });
  827. }
  828. },
  829. formSubmit: function(e) {
  830. //将交办单位的名称带出
  831. for (let i = 0; i < this.questionList.length; i++) {
  832. if (this.questionList[i].checkUserList != []) {
  833. this.questionList[i].checkUserListName=this.questionList[i].checkUserList.map((value) => {
  834. const item = this.pickerData.find((option) => option.value === value);
  835. return item ? item.label : value; // 如果找不到,返回 value
  836. })
  837. .join(",");
  838. }
  839. this.questionList[i].checkUserList=this.questionList[i].checkUserList.join(",");
  840. //附件处理
  841. this.questionList[i].des6 = [];
  842. //将原先附件放入
  843. if(this.questionList[i].picLists2.length>0){
  844. for (let ai = 0; ai < this.questionList[i].picLists2.length; ai++) {
  845. this.questionList[i].des6.push(this.questionList[i].picLists2[ai].uuid)
  846. }
  847. }
  848. this.questionList[i].picUrl.forEach(item => {
  849. this.questionList[i].des6.push(item.url)
  850. })
  851. this.questionList[i].des6 = this.questionList[i].des6.toString();
  852. }
  853. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  854. this.checkinput();
  855. },
  856. checkinput(){
  857. if(this.hasDuplicateQName(this.questionList)){
  858. uni.showToast({
  859. icon: 'none',
  860. title: '问题名称不能重复!'
  861. });
  862. }else{
  863. uni.showLoading()
  864. loginService.save2OpRecord(this.inputForm).then(({
  865. data
  866. }) => {
  867. uni.hideLoading();
  868. uni.showToast({
  869. title: "提交成功!",
  870. icon: "success"
  871. });
  872. uni.redirectTo({
  873. url: '/pages/question/questionList'
  874. })
  875. }).catch((e) => {
  876. uni.hideLoading();
  877. })
  878. }
  879. },
  880. hasDuplicateQName(array) {
  881. const seen = new Set();
  882. for (const item of array) {
  883. if (seen.has(item.qname)) {
  884. return true; // 找到重复的 qName
  885. }
  886. seen.add(item.qname);
  887. }
  888. return false; // 没有重复的 qName
  889. }
  890. }
  891. }
  892. </script>
  893. <style>
  894. /* .file-title) {
  895. font-size: 17px !important;
  896. } */
  897. input,textarea{
  898. color: #8799a3;
  899. }
  900. .input1{
  901. background-color: #ffffff;
  902. padding: 1upx 40upx;
  903. display: flex;
  904. align-items: center;
  905. padding-top: 20upx;
  906. border-bottom: 1px solid #eee;
  907. }
  908. .input1 .title {
  909. text-align: justify;
  910. padding-right: 30upx;
  911. font-size: 30upx;
  912. position: relative;
  913. height: 60upx;
  914. line-height: 60upx;
  915. border: ;
  916. }
  917. .title2{
  918. width: 75%;
  919. text-align: left;
  920. }
  921. .input2 {
  922. flex: 1;
  923. font-size: 30upx;
  924. color: #555;
  925. padding-right: 20upx;
  926. width: 100%;
  927. }
  928. .uni-input{
  929. }
  930. .textbg{
  931. display: flex;
  932. background-color: white;
  933. padding-top: 29rpx;
  934. }
  935. .text12{
  936. width: 200rpx;
  937. margin-left: 30rpx;
  938. color: #000000;
  939. font-size: 29rpx;
  940. }
  941. .text2{
  942. flex: 1;
  943. color: #000000;
  944. font-size: 30rpx;
  945. padding-bottom: 2rpx;
  946. }
  947. .text22{
  948. flex: 1;
  949. color: #666666;
  950. font-size: 29rpx;
  951. padding-bottom: 2rpx;
  952. align-self: flex-end;
  953. }
  954. .titlebg2{
  955. display: flex;
  956. background-color: white;
  957. padding-left: 22rpx;
  958. padding-top: 35rpx;
  959. padding-bottom: 25rpx;
  960. margin-bottom: 2rpx;
  961. }
  962. .titlet1{
  963. width: 7rpx;
  964. margin-top: 7rpx;
  965. margin-bottom: 7rpx;
  966. background-color: #2752eb;
  967. margin-right: 8rpx;
  968. }
  969. .titlet2{
  970. font-weight: 800;
  971. color: #2752eb;
  972. }
  973. .titlebb{
  974. color: #000000;
  975. font-weight: 800;
  976. padding-left: 40rpx;
  977. background-color: #ffffff;
  978. padding-top: 20rpx;
  979. }
  980. .titlebb2{
  981. color: #000000;
  982. padding-left: 40rpx;
  983. background-color: #ffffff;
  984. padding-top: 20rpx;
  985. }
  986. .flexC{
  987. display: flex;
  988. }
  989. .bt1{
  990. flex:1;
  991. margin: 30rpx;
  992. }
  993. .bt2{
  994. flex:1;
  995. margin: 30rpx;
  996. }
  997. .radiog{
  998. flex:1;
  999. margin: 10rpx;
  1000. }
  1001. .radiog2{
  1002. display: flex;
  1003. }
  1004. .uni-list-cell{
  1005. display: flex;
  1006. }
  1007. .cu-form-group{
  1008. background-color: #ffffff;
  1009. padding: 0.5px 22px;
  1010. display: flex;
  1011. align-items: center;
  1012. min-height: 44px;
  1013. }
  1014. .modal-content {
  1015. padding: 20px;
  1016. }
  1017. .record-item {
  1018. background-color: #fff;
  1019. border-radius: 10rpx;
  1020. padding: 20rpx;
  1021. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  1022. display: flex;
  1023. flex-direction: column;
  1024. }
  1025. .record-p1{
  1026. width: 10px;
  1027. height: 10px;
  1028. border-radius: 100px;
  1029. background-color: rgb(60, 156, 255);
  1030. }
  1031. .record-p2{
  1032. width: 10px;
  1033. height: 10px;
  1034. border-radius: 100px;
  1035. background-color: rgb(150, 151, 153);
  1036. }
  1037. .record-x1{
  1038. width: 20rpx;
  1039. height: 100%;
  1040. background-color: rgb(150, 151, 153);
  1041. }
  1042. .record-name {
  1043. font-size: 32rpx;
  1044. font-weight: bold;
  1045. margin-bottom: 10rpx;
  1046. margin-left: 10rpx;
  1047. }
  1048. .record-time {
  1049. font-size: 28rpx;
  1050. margin-left: 10rpx;
  1051. color: #666;
  1052. margin-bottom: 10rpx;
  1053. }
  1054. .submit-time {
  1055. font-size: 14px;
  1056. color: #666;
  1057. margin-left: 28rpx;
  1058. position: relative;
  1059. display: flex;
  1060. flex-direction:column;
  1061. }
  1062. .submit-time::before {
  1063. content: '';
  1064. position: absolute;
  1065. left: -10px;
  1066. top: 0;
  1067. height: 100%;
  1068. width: 1px;
  1069. background-color:rgb(150, 151, 153);
  1070. }
  1071. .attachment-item {
  1072. display: flex;
  1073. justify-content: space-between;
  1074. align-items: center;
  1075. margin-bottom: 10px;
  1076. }
  1077. </style>