questionInfo.vue 29 KB

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