questionInfo.vue 35 KB

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