questionInfo.vue 28 KB

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