questionInfo.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058
  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="item.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')&&item.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')&&!item.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. importUserId: [],
  326. pickerData: [],
  327. pickerDataOld: [],
  328. selectedValues: []
  329. }
  330. },
  331. computed: {
  332. // 动态计算选中的 label
  333. selectedLabels() {
  334. return this.item.checkUserList
  335. .map((value) => {
  336. const item = this.pickerData.find((option) => option.value === value);
  337. return item ? item.label : value; // 如果找不到,返回 value
  338. })
  339. .join(", ");
  340. },
  341. },
  342. onShow() {
  343. this.$auth.checkLogin()
  344. loginService.getDictList({
  345. dictTypeId:"1907700775364263937"
  346. }).then(({data}) => {
  347. this.pickerData = data
  348. this.pickerDataOld = data
  349. //默认第一个选项
  350. //this.checkUserList=this.pickerData[0].value;
  351. }).catch(e => {
  352. })
  353. },
  354. watch: {
  355. value2(val) {
  356. console.log('我是更新后的选中数据', val)
  357. },
  358. },
  359. created() {
  360. },
  361. mounted() {
  362. },
  363. async onLoad(query) {
  364. this.uid= $auth.getUserInfo().id;
  365. this.roleIds= $auth.getUserInfo().roleIds;
  366. if(query.ischeck!=undefined){
  367. //查看
  368. this.ischeck=true;
  369. let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
  370. this.inputForm.id = data2.data.id;
  371. this.inputForm.name = data2.data.qyName;
  372. this.inputForm.qySd = data2.data.qySd;
  373. this.inputForm.lxr = data2.data.qyFzr;
  374. this.inputForm.phone = data2.data.phone;
  375. this.inputForm.bz5 = data2.data.officer;
  376. //判断是否显示提交,暂存按钮
  377. if(data2.data.states=='1'&&data2.data.des1.includes($auth.getUserInfo().loginName)){
  378. this.cansubmit=true;
  379. }
  380. //将流程的最后一步设置到查看(问题处理,预计办结时间,处理建议)
  381. for (let i = 0; i < data2.data.dzfQuestionDetilDTOList.length; i++) {
  382. let opsize=data2.data.dzfQuestionDetilDTOList[i].oplist.length;
  383. data2.data.dzfQuestionDetilDTOList[i].showpjedit=false
  384. for (let j = 0; j < opsize; j++) {
  385. //当前登录人
  386. if (data2.data.dzfQuestionDetilDTOList[i].oplist[j].createBy.id === this.uid) {
  387. //问题处理
  388. if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='3'){
  389. data2.data.dzfQuestionDetilDTOList[i].current=0
  390. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  391. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
  392. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='4'){
  393. data2.data.dzfQuestionDetilDTOList[i].current=1
  394. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='5'){
  395. //挂钩干部
  396. if(this.roleIds=='1910141956174053377'){
  397. data2.data.dzfQuestionDetilDTOList[i].current=2
  398. //交办部门
  399. }else{
  400. data2.data.dzfQuestionDetilDTOList[i].current=1
  401. }
  402. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='6'){
  403. //挂钩干部
  404. if(this.roleIds=='1910141956174053377'){
  405. data2.data.dzfQuestionDetilDTOList[i].current=3
  406. //交办部门
  407. }else{
  408. data2.data.dzfQuestionDetilDTOList[i].current=2
  409. }
  410. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='7'){
  411. //挂钩干部
  412. if(this.roleIds=='1910141956174053377'){
  413. data2.data.dzfQuestionDetilDTOList[i].current=4
  414. //交办部门
  415. }else{
  416. data2.data.dzfQuestionDetilDTOList[i].current=3
  417. }
  418. }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='8'){
  419. //挂钩干部
  420. if(this.roleIds=='1910141956174053377'){
  421. data2.data.dzfQuestionDetilDTOList[i].current=5
  422. //交办部门
  423. }else{
  424. data2.data.dzfQuestionDetilDTOList[i].current=4
  425. }
  426. }
  427. //大走访办公室角色
  428. else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='9'){
  429. data2.data.dzfQuestionDetilDTOList[i].current=1
  430. data2.data.dzfQuestionDetilDTOList[i].showjbdw2=true;
  431. data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
  432. }
  433. //处理建议
  434. data2.data.dzfQuestionDetilDTOList[i].delyj=data2.data.dzfQuestionDetilDTOList[i].oplist[j].des6
  435. }
  436. }
  437. //办结时间就是显示最后一条处理意见的办结时间
  438. if(data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=undefined&&data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=''){
  439. data2.data.dzfQuestionDetilDTOList[i].finishdate=data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5
  440. }
  441. //每条问题是否需要提交
  442. if(data2.data.dzfQuestionDetilDTOList[i].des1!=undefined){
  443. let nextuser=data2.data.dzfQuestionDetilDTOList[i].des1+",";
  444. if(nextuser.includes($auth.getUserInfo().loginName+",")){
  445. data2.data.dzfQuestionDetilDTOList[i].cansubmit=true;
  446. }else{
  447. data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
  448. }
  449. }else{
  450. data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
  451. }
  452. data2.data.dzfQuestionDetilDTOList[i].checkUserList=[];
  453. }
  454. this.questionList=data2.data.dzfQuestionDetilDTOList;
  455. if(query.ischeck=='2'){
  456. this.title="诉求办理评价";
  457. this.canpj=true;
  458. }
  459. }else{
  460. //新增
  461. let data2 = await loginService.queryByUserName()
  462. this.inputForm = this.recover(this.inputForm, data2.data)
  463. this.inputForm.id="";
  464. }
  465. },
  466. methods: {
  467. //交办单位
  468. selectChange2() {
  469. // 此处为点击的事件
  470. this.pickerData=this.pickerDataOld;
  471. },
  472. searchEvent(val) {
  473. this.pickerData=this.filteredItems(val);
  474. },
  475. filteredItems(searchQuery) {
  476. const query = searchQuery.trim();
  477. if (!query) return this.pickerDataOld;
  478. return this.pickerDataOld.filter(item => {
  479. return item.label.toString().includes(query);
  480. });
  481. },
  482. //交办单位结束
  483. onDateChange(e,index2) {
  484. this.$set(this.questionList[index2], 'finishdate', e.detail.value);
  485. },
  486. radioChange: function(evt,index2) {
  487. //大走访办公室角色时
  488. if(this.roleIds=='1910175386924417025'){
  489. if(evt.detail.value=='办结'){
  490. this.questionList[index2].showjbdw=false;
  491. this.questionList[index2].delyj="";
  492. }else if(evt.detail.value=='交办'){
  493. this.questionList[index2].showjbdw=true;
  494. this.questionList[index2].delyj="请2日内回应,10内反馈办理结果,如办结请上传加盖公章的书面材料";
  495. }
  496. for (let i = 0; i < this.dels2.length; i++) {
  497. if (this.dels2[i] === evt.detail.value) {
  498. this.questionList[index2].current = i;
  499. break;
  500. }
  501. }
  502. //挂钩干部
  503. }else if(this.roleIds=='1910141956174053377'){
  504. console.log("选择:"+evt.detail.value);
  505. for (let i = 0; i < this.dels.length; i++) {
  506. if (this.dels[i] === evt.detail.value) {
  507. this.questionList[index2].current = i;
  508. break;
  509. }
  510. }
  511. //交办部门
  512. }else if(this.roleIds=='1910175949166673921'){
  513. console.log("选择:"+evt.detail.value);
  514. for (let i = 0; i < this.dels3.length; i++) {
  515. if (this.dels3[i] === evt.detail.value) {
  516. this.questionList[index2].current = i;
  517. break;
  518. }
  519. }
  520. }
  521. },
  522. radioChange2: function(evt,index2,witch) {
  523. if(evt.detail.value=='非常满意'||evt.detail.value=='满意'){
  524. this.questionList[index2].showpjedit=false;
  525. this.questionList[index2].pjyj="";
  526. }else if(evt.detail.value=='不满意'){
  527. this.questionList[index2].showpjedit=true;
  528. }
  529. if(witch==1){
  530. for (let i = 0; i < this.dels4.length; i++) {
  531. if (this.dels4[i] === evt.detail.value) {
  532. this.questionList[index2].current1 = i;
  533. break;
  534. }
  535. }
  536. }else{
  537. for (let i = 0; i < this.dels5.length; i++) {
  538. if (this.dels5[i] === evt.detail.value) {
  539. this.questionList[index2].current2 = i;
  540. break;
  541. }
  542. }
  543. }
  544. },
  545. addfj(){
  546. },
  547. addp(){
  548. this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
  549. },
  550. del(index2){
  551. this.questionList.splice(index2, 1);
  552. },
  553. bindPickerChange: function(e,index2) {
  554. if(e.detail.value==0){
  555. this.questionList[index2].t1='缺口数';
  556. this.questionList[index2].t1s= '请填写缺口数';
  557. this.questionList[index2].t1d= '人';
  558. }else if(e.detail.value==1){
  559. this.questionList[index2].t1='缺口数';
  560. this.questionList[index2].t1s= '请填写缺口数';
  561. this.questionList[index2].t1d= '万元';
  562. }else if(e.detail.value==2){
  563. this.questionList[index2].t1='缺口数';
  564. this.questionList[index2].t1s= '请填写缺口数';
  565. this.questionList[index2].t1d= '';
  566. }else{
  567. this.questionList[index2].t1='';
  568. this.questionList[index2].t1s= '';
  569. this.questionList[index2].t1d= '';
  570. }
  571. this.questionList[index2].qTypeindex = e.detail.value;
  572. this.questionList[index2].qtype=this.parkList[e.detail.value]
  573. },
  574. // 获取上传进度
  575. progress(e) {
  576. console.log('上传进度:', e)
  577. },
  578. // 上传成功
  579. success(e) {
  580. console.log('上传成功')
  581. },
  582. // 上传失败
  583. fail(e) {
  584. console.log('上传失败:', e)
  585. },
  586. deleteFile(e) {
  587. this.picUrl.splice(e.index, 1)
  588. },
  589. // 获取上传状态
  590. select(e) {
  591. console.log('选择文件:', e)
  592. var _this = this
  593. var i = 0
  594. upload()
  595. function upload() {
  596. if (i >= e.tempFiles.length) {
  597. return;
  598. }
  599. var item = e.tempFiles[i]
  600. uni.showLoading({
  601. title: "上传中",
  602. mask: true
  603. });
  604. uni.uploadFile({
  605. url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
  606. filePath: item.url,
  607. name: 'file',
  608. formData: {
  609. 'fileName': item.name
  610. },
  611. header: {
  612. 'token': _this.$auth.getUserToken()
  613. },
  614. success: (res) => {
  615. var data = res.data
  616. if (typeof data['error'] != "undefined") {
  617. uni.showToast({
  618. icon: 'none',
  619. title: '上传失败,请联系开发!'
  620. });
  621. _this.$refs.picFile.clearFiles(_this.picLists.length)
  622. } else {
  623. _this.picUrl.push({
  624. url: data,
  625. uuid: item.uuid
  626. })
  627. i++;
  628. upload()
  629. }
  630. },
  631. fail: () => {
  632. uni.hideLoading();
  633. uni.showToast({
  634. icon: 'none',
  635. title: '上传失败,请联系开发!'
  636. });
  637. _this.$refs.picFile.clearFiles(_this.picLists.length)
  638. },
  639. complete: function() {
  640. uni.hideLoading();
  641. }
  642. });
  643. }
  644. },
  645. save(){
  646. console.log("交办单位:"+this.checkUserList)
  647. // this.inputForm.des10="";
  648. // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  649. // this.checkinput();
  650. },
  651. pjsave(){
  652. let cansave=true;
  653. for (let i = 0; i < this.questionList.length; i++) {
  654. this.questionList[i].checkUserList="";
  655. if (this.questionList[i].current1 ==undefined||this.questionList[i].current2 ==undefined) {
  656. cansave=false;
  657. }
  658. }
  659. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  660. if(cansave){
  661. uni.showLoading()
  662. loginService.savepj(this.inputForm).then(({
  663. data
  664. }) => {
  665. uni.hideLoading();
  666. uni.showToast({
  667. title: "评价成功!",
  668. icon: "success"
  669. });
  670. uni.redirectTo({
  671. url: '/pages/question/questionList?w=2'
  672. })
  673. }).catch((e) => {
  674. uni.hideLoading();
  675. })
  676. }else{
  677. uni.showToast({
  678. title: "评价意见还未填写!",
  679. icon: "success"
  680. });
  681. }
  682. },
  683. formSubmit: function(e) {
  684. //将交办单位的名称带出
  685. for (let i = 0; i < this.questionList.length; i++) {
  686. if (this.questionList[i].checkUserList != []) {
  687. this.questionList[i].checkUserListName=this.questionList[i].checkUserList.map((value) => {
  688. const item = this.pickerData.find((option) => option.value === value);
  689. return item ? item.label : value; // 如果找不到,返回 value
  690. })
  691. .join(",");
  692. }
  693. this.questionList[i].checkUserList=this.questionList[i].checkUserList.join(",");
  694. }
  695. this.inputForm.dzfQuestionDetilDTOList=this.questionList;
  696. this.checkinput();
  697. },
  698. checkinput(){
  699. if(this.hasDuplicateQName(this.questionList)){
  700. uni.showToast({
  701. icon: 'none',
  702. title: '问题名称不能重复!'
  703. });
  704. }else{
  705. uni.showLoading()
  706. loginService.save2OpRecord(this.inputForm).then(({
  707. data
  708. }) => {
  709. uni.hideLoading();
  710. uni.showToast({
  711. title: "提交成功!",
  712. icon: "success"
  713. });
  714. uni.redirectTo({
  715. url: '/pages/question/questionList'
  716. })
  717. }).catch((e) => {
  718. uni.hideLoading();
  719. })
  720. }
  721. },
  722. hasDuplicateQName(array) {
  723. const seen = new Set();
  724. for (const item of array) {
  725. if (seen.has(item.qname)) {
  726. return true; // 找到重复的 qName
  727. }
  728. seen.add(item.qname);
  729. }
  730. return false; // 没有重复的 qName
  731. }
  732. }
  733. }
  734. </script>
  735. <style>
  736. /* .file-title) {
  737. font-size: 17px !important;
  738. } */
  739. input,textarea{
  740. color: #8799a3;
  741. }
  742. .input1{
  743. background-color: #ffffff;
  744. padding: 1upx 40upx;
  745. display: flex;
  746. align-items: center;
  747. padding-top: 20upx;
  748. border-bottom: 1px solid #eee;
  749. }
  750. .input1 .title {
  751. text-align: justify;
  752. padding-right: 30upx;
  753. font-size: 30upx;
  754. position: relative;
  755. height: 60upx;
  756. line-height: 60upx;
  757. border: ;
  758. }
  759. .title2{
  760. width: 75%;
  761. text-align: left;
  762. }
  763. .input2 {
  764. flex: 1;
  765. font-size: 30upx;
  766. color: #555;
  767. padding-right: 20upx;
  768. width: 500rpx;
  769. }
  770. .uni-input{
  771. }
  772. .textbg{
  773. display: flex;
  774. background-color: white;
  775. padding-top: 29rpx;
  776. }
  777. .text12{
  778. width: 200rpx;
  779. margin-left: 30rpx;
  780. color: #000000;
  781. font-size: 29rpx;
  782. }
  783. .text2{
  784. flex: 1;
  785. color: #000000;
  786. font-size: 30rpx;
  787. padding-bottom: 2rpx;
  788. }
  789. .text22{
  790. flex: 1;
  791. color: #666666;
  792. font-size: 29rpx;
  793. padding-bottom: 2rpx;
  794. align-self: flex-end;
  795. }
  796. .titlebg2{
  797. display: flex;
  798. background-color: white;
  799. padding-left: 22rpx;
  800. padding-top: 35rpx;
  801. padding-bottom: 25rpx;
  802. margin-bottom: 2rpx;
  803. }
  804. .titlet1{
  805. width: 7rpx;
  806. margin-top: 7rpx;
  807. margin-bottom: 7rpx;
  808. background-color: #2752eb;
  809. margin-right: 8rpx;
  810. }
  811. .titlet2{
  812. font-weight: 800;
  813. color: #2752eb;
  814. }
  815. .titlebb{
  816. color: #000000;
  817. font-weight: 800;
  818. padding-left: 40rpx;
  819. background-color: #ffffff;
  820. padding-top: 20rpx;
  821. }
  822. .flexC{
  823. display: flex;
  824. }
  825. .bt1{
  826. flex:1;
  827. margin: 30rpx;
  828. }
  829. .bt2{
  830. flex:1;
  831. margin: 30rpx;
  832. }
  833. .radiog{
  834. flex:1;
  835. margin: 10rpx;
  836. }
  837. .radiog2{
  838. display: flex;
  839. }
  840. .uni-list-cell{
  841. display: flex;
  842. }
  843. .cu-form-group2{
  844. background-color: #ffffff;
  845. padding: 0.5px 22px;
  846. display: flex;
  847. align-items: center;
  848. min-height: 44px;
  849. }
  850. .modal-content {
  851. padding: 20px;
  852. }
  853. .record-item {
  854. background-color: #fff;
  855. border-radius: 10rpx;
  856. padding: 20rpx;
  857. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  858. display: flex;
  859. flex-direction: column;
  860. }
  861. .record-p1{
  862. width: 10px;
  863. height: 10px;
  864. border-radius: 100px;
  865. background-color: rgb(60, 156, 255);
  866. }
  867. .record-p2{
  868. width: 10px;
  869. height: 10px;
  870. border-radius: 100px;
  871. background-color: rgb(150, 151, 153);
  872. }
  873. .record-x1{
  874. width: 20rpx;
  875. height: 100%;
  876. background-color: rgb(150, 151, 153);
  877. }
  878. .record-name {
  879. font-size: 32rpx;
  880. font-weight: bold;
  881. margin-bottom: 10rpx;
  882. margin-left: 10rpx;
  883. }
  884. .record-time {
  885. font-size: 28rpx;
  886. margin-left: 10rpx;
  887. color: #666;
  888. margin-bottom: 10rpx;
  889. }
  890. .submit-time {
  891. font-size: 14px;
  892. color: #666;
  893. margin-left: 28rpx;
  894. position: relative;
  895. display: flex;
  896. flex-direction:column;
  897. }
  898. .submit-time::before {
  899. content: '';
  900. position: absolute;
  901. left: -10px;
  902. top: 0;
  903. height: 100%;
  904. width: 1px;
  905. background-color:rgb(150, 151, 153);
  906. }
  907. </style>