46350cdc6a93ea94522620f8f33f4cde9e3b8baa.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <template>
  2. <el-form ref="problemForm" :rules="rules" :model="problemForm" label-width="260px" class="wtzgfc_add_pblm">
  3. <el-card>
  4. <p class="p_title">问题整改情况</p>
  5. <el-form-item label="问题类别" style="text-align:left">
  6. <el-input placeholder="请输入内容" v-model="problemForm.pblmType" class="w30">
  7. </el-input>
  8. </el-form-item>
  9. <el-form-item label="检查项目" style="text-align:left">
  10. <el-input placeholder="请输入内容" v-model="problemForm.pblmOption" class="w30">
  11. </el-input>
  12. </el-form-item>
  13. <el-form-item label="问题描述">
  14. <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="problemForm.pblmDesc" class="w30">
  15. </el-input>
  16. </el-form-item>
  17. <!--<el-form-item label="问题等级:" style="text-align:left">-->
  18. <!--<el-input placeholder="请输入内容" v-model="problemForm.pblmLevl" class="w30">-->
  19. <!--</el-input>-->
  20. <!--</el-form-item>-->
  21. <el-form-item label="问题等级:" style="text-align:left">
  22. <el-select v-model="problemForm.pblmLevl" clearable placeholder="请选择" filterable class="w30">
  23. <el-option
  24. v-for="item in supervisionState"
  25. :key="item.value"
  26. :label="item.label"
  27. :value="item.value"
  28. ></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <!--<el-form-item label="整改状态:" style="text-align:left" required>-->
  32. <!--<el-select v-model="problemForm.rectConc" clearable placeholder="请选择" filterable class="w30">-->
  33. <!--<el-option-->
  34. <!--v-for="(item,index) in abarbeitungStatusList"-->
  35. <!--:key="index"-->
  36. <!--:label="item.label"-->
  37. <!--:value="item.value"-->
  38. <!--&gt;</el-option>-->
  39. <!--</el-select>-->
  40. <!--</el-form-item>-->
  41. <el-form-item label="整改措施:" style="text-align:left" required>
  42. <el-input placeholder="请输入内容" v-model="problemForm.rectMsrs" class="w30">
  43. </el-input>
  44. </el-form-item>
  45. <!--<el-form-item label="审核状态:" style="text-align:left" required>-->
  46. <!--<el-select v-model="problemForm.auditConc" clearable placeholder="请选择" filterable class="w30">-->
  47. <!--<el-option-->
  48. <!--v-for="(item,index) in expertReviewList"-->
  49. <!--:key="index"-->
  50. <!--:label="item.label"-->
  51. <!--:value="item.value"-->
  52. <!--&gt;</el-option>-->
  53. <!--</el-select>-->
  54. <!--</el-form-item>-->
  55. <!--<el-form-item label="上报人员:" style="text-align:left" prop="inspPblmCate">-->
  56. <!--<el-input placeholder="请输入" v-model="problemForm.inspPblmName" class="w30">-->
  57. <!--</el-input>-->
  58. <!--</el-form-item>-->
  59. <!--<el-form-item label="上报时间" style="text-align:left">-->
  60. <!--<el-date-picker v-model="problemForm.startDate" type="date" value-format="yyyy-MM-dd"-->
  61. <!--placeholder="选择日期" class="w30"></el-date-picker>-->
  62. <!--</el-form-item>-->
  63. </el-card>
  64. <el-card style="margin-top: 20px;">
  65. <p class="p_title">佐证材料</p>
  66. <!--v-if="!addObj.zcOtherIsMakeFiles.length"-->
  67. <el-form-item class="zzcl_fj" v-if="!problemForm.zcOtherIsMakeFiles.length">
  68. <uploadZz
  69. ref="uploadZzcl"
  70. :url="`/pdcApi/file/insert?bizId=${currentObjectRgstrId}&bizType=MEND_PROV`"
  71. accept=".pdf,.PDF,.doc,.DOC,.DOCX,.docx,.excel,.EXCEL"
  72. @uploadOver="removeNewSupervisionZcOtherIsMake"
  73. ></uploadZz>
  74. <!--url="`/pdcApi/file/insert?bizId=${addObj.id}&bizType=zcWaterIsMake`"-->
  75. <!--<upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>-->
  76. </el-form-item>
  77. <el-form-item label="上传列表" v-if="problemForm.zcOtherIsMakeFiles.length">
  78. <ul v-for="(item,index) in problemForm.zcOtherIsMakeFiles" :key="index">
  79. <li style="list-style: none;">
  80. <el-button type="text" class="w300">{{ item.fileName }}</el-button>
  81. <el-button type="text" @click="rowPreview(item)">下载</el-button>
  82. <el-button type="text" @click="rowDelete(item,index,'qt')" class="font_red">删除</el-button>
  83. </li>
  84. </ul>
  85. </el-form-item>
  86. </el-card>
  87. <el-card style="margin-top: 20px;">
  88. <p class="p_title">复核情况</p>
  89. <el-form-item label="整改状态:" style="text-align:left">
  90. <el-radio-group v-model="problemForm.revwRectConc">
  91. <el-radio label="1">未整改</el-radio>
  92. <el-radio label="2">正在整改</el-radio>
  93. <el-radio label="3">整改完成</el-radio>
  94. <br/>
  95. <br/>
  96. <el-radio label="4">整改不到位</el-radio>
  97. <el-radio label="5">上报整改情况与实际不符</el-radio>
  98. </el-radio-group>
  99. </el-form-item>
  100. <el-form-item :label="problemForm.revwRectConc == 3 ? '实际整改完成时间' : problemForm.revwRectConc == 2 ? '计划整改完成时间': ''"
  101. style="text-align:left"
  102. v-if="(Number(problemForm.revwRectConc) === 2 || Number(problemForm.revwRectConc) === 3) && problemForm.revwRectConc">
  103. <el-date-picker v-model="problemForm.realPlanDt" type="date" value-format="yyyy-MM-dd"
  104. placeholder="选择日期" class="w30"
  105. v-if="(Number(problemForm.revwRectConc) === 2 || Number(problemForm.revwRectConc) === 3) && problemForm.revwRectConc"></el-date-picker>
  106. </el-form-item>
  107. <div>
  108. <el-form-item label="备注" v-if="problemForm.revwRectConc != 3">
  109. <el-input
  110. type="textarea"
  111. :rows="4"
  112. placeholder="请输入"
  113. v-model="problemForm.revwRectPblm"
  114. class="w30">
  115. </el-input>
  116. </el-form-item>
  117. <el-form-item label="备注" prop="revwRectPblm" v-else key="revwRectPblm">
  118. <el-input
  119. type="textarea"
  120. :rows="4"
  121. placeholder="请输入"
  122. v-model="problemForm.revwRectPblm"
  123. class="w30">
  124. </el-input>
  125. </el-form-item>
  126. </div>
  127. </el-card>
  128. <el-card style="margin-top: 20px;">
  129. <p class="p_title">多媒体</p>
  130. <el-form-item>
  131. <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizType=MEND_EXTRA&bizId=`"
  132. @uploadOver="removeNewSupervision"></upload>
  133. </el-form-item>
  134. </el-card>
  135. <el-form-item style="margin-top: 50px">
  136. <el-button type="primary" @click="onSubmit('problemForm')" style="width: 100px;float:right"
  137. :loading="saveLoading">保存
  138. </el-button>
  139. </el-form-item>
  140. </el-form>
  141. </template>
  142. <script>
  143. import request from '@util/gw_ajax_request.js'
  144. import {hostUrl} from '@util/global_variable'
  145. export default {
  146. props: ['objId', 'objName', 'villType', 'objType', 'problemMiddleType', 'problemSmallType', 'engId', 'currentObjectRgstrId', 'problData', 'currentProblemId', 'currentResCode', 'currentAdCode', 'currentRsvrNm'],
  147. data() {
  148. return {
  149. problemForm: {
  150. pblmDesc: '',//问题描述 ,
  151. pblmLevl: '',//问题等级 ,
  152. pblmOption: '',//检查项目 ,
  153. pblmSn: '',//问题序号 ,
  154. pblmType: '',//问题类别 ,
  155. proName: '',//省 ,
  156. realPlanDt: '',//实际/计划整改完成时间 ,
  157. rectConc: '',//整改状态(1:未整改;2:正在整改;3:已整改) ,
  158. rectMsrs: '',//整改措施 ,
  159. revwInfo: '',//复核情况 ,
  160. revwRectConc: '',//复核整改状态(1:未整改;2:正在整改;3:整改完成;4:整改不到位;5:上报整改情况与实际不符) ,
  161. revwRectPblm: '',//复核整改问题 ,
  162. revwState: '',//复核填报状态(0:未填报;1:填报中;2:已填报) ,
  163. rgstrId: '',//登记表ID ,
  164. rsCode: '',//水库编码 ,
  165. rsName: '',//水库名称 ,
  166. safeComment: '',//工况总体评价 ,
  167. unit: '',//管理单位 ,
  168. uptm: '',//修改时间 ,
  169. year: '',//年度
  170. gwComFiles: [],
  171. zcOtherIsMakeFiles: [],
  172. },
  173. supervisionState: [
  174. {
  175. value: "0",
  176. label: "一般"
  177. },
  178. {
  179. value: "1",
  180. label: "较重"
  181. },
  182. {
  183. value: "2",
  184. label: "严重"
  185. },
  186. {
  187. value: "3",
  188. label: "特别严重"
  189. }
  190. ],
  191. abarbeitungStatusList: [
  192. {
  193. label: "未填写",
  194. value: "0"
  195. },
  196. {
  197. label: "未整改",
  198. value: "1"
  199. },
  200. {
  201. label: "正在整改",
  202. value: "2"
  203. },
  204. {
  205. label: "已整改",
  206. value: "3"
  207. }
  208. ],
  209. expertReviewList: [
  210. {
  211. 'label': '审核已整改',
  212. 'value': '1'
  213. },
  214. {
  215. 'label': '审核未整改',
  216. 'value': '2'
  217. },
  218. {
  219. 'label': '未审核',
  220. 'value': '3'
  221. },
  222. {
  223. 'label': '审核正在整改',
  224. 'value': '4'
  225. }
  226. ],
  227. inspPblmCate: "",
  228. imgList: [],
  229. videoList: [],
  230. audioList: [],
  231. pblmStat: '',
  232. gwComFiles: [],
  233. problemList: [],
  234. currentCheckPointList: [
  235. {
  236. value: "1",
  237. label: "质量安全"
  238. },
  239. {
  240. value: "2",
  241. label: "合同"
  242. },
  243. {
  244. value: "3",
  245. label: "资金"
  246. }
  247. ],
  248. currentProblemDescList: [
  249. {
  250. value: "1",
  251. label: "项目法人(建设单位)"
  252. },
  253. {
  254. value: "2",
  255. label: "勘察设计单位"
  256. },
  257. {
  258. value: "3",
  259. label: "监理单位"
  260. },
  261. {
  262. value: "4",
  263. label: "施工单位"
  264. },
  265. {
  266. value: "5",
  267. label: "金属结构及机电设备安装单位"
  268. },
  269. {
  270. value: "6",
  271. label: "安全监测单位"
  272. },
  273. {
  274. value: "7",
  275. label: "质量检测单位"
  276. }
  277. ],
  278. t1: '',
  279. t2: '',
  280. t3: '',
  281. xiangqingmiaoshu: '',
  282. wenTiLeiBie: "",
  283. jianChaXiangMu: "",
  284. rules: {
  285. revwRectPblm: [{
  286. required: true,
  287. message: '请填写备注',
  288. trigger: 'blur'
  289. }],
  290. },
  291. saveLoading: false
  292. }
  293. },
  294. components: {
  295. upload: resolve => {
  296. require(["@widget/uploadFile.vue"], resolve);
  297. },
  298. uploadZz: resolve => {
  299. require(["@widget/uploadPdf.vue"], resolve);
  300. }
  301. },
  302. computed: {
  303. recPers() {
  304. return localStorage.getItem('userid') ? localStorage.getItem('userid') : '';
  305. }
  306. },
  307. methods: {
  308. async onSubmit(problemForm) {
  309. this.$refs[problemForm].validate((valid) => {
  310. if (valid) {
  311. this.problemForm.recPers = this.recPers;
  312. this.problemForm.rgstrId = this.currentObjectRgstrId;
  313. this.problemForm.rsName = this.currentRsvrNm;
  314. this.problemForm.adCode = this.currentAdCode;
  315. this.problemForm.rsCode = this.currentResCode;
  316. this.problemForm.revwState = '2';//只要添加问题就是已复核状态
  317. // if (!this.problemForm.rectConc) {
  318. // this.$message.warning('请选择整改状态');
  319. // return;
  320. // }
  321. if (!this.problemForm.rectMsrs) {
  322. this.$message.warning('请填写整改措施');
  323. return;
  324. }
  325. // if (!this.problemForm.auditConc) {
  326. // this.$message.warning('请选择审核状态');
  327. // return;
  328. // }
  329. this.$nextTick(() => {
  330. if (this.$refs.uploadFile.submitUpload(this.currentObjectRgstrId)) {
  331. this.removeNewSupervision();
  332. }
  333. })
  334. } else {
  335. console.log('error submit!!');
  336. return false;
  337. }
  338. });
  339. },
  340. // 文件上传
  341. submitUpload() {
  342. this.$refs.upload.submit();
  343. },
  344. // updatefilelist(arg) {
  345. // request.post('/dc/insp/pblm/update', {
  346. // pblmId: this.pblmId,
  347. // gwComFiles: arg,
  348. // pblmStat: this.pblmStat
  349. // }).then(res => {
  350. // this.removeNewSupervision()
  351. // });
  352. // },
  353. removeNewSupervision(arg) {
  354. if (arg) {
  355. this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg);
  356. }
  357. if (!this.saveLoading) {
  358. this.saveLoading = true;
  359. this.problemForm.gwComFiles = [...this.problemForm.gwComFiles, ...this.problemForm.zcOtherIsMakeFiles];
  360. delete this.problemForm.zcOtherIsMakeFiles;
  361. request.post('bis/insp/rsvr/pblm/mend/2021/update', this.problemForm).then(res => {
  362. if (res.success) {
  363. this.$message.success('保存成功');
  364. this.$emit('closeDialog');
  365. this.$refs.uploadFile.init();
  366. }
  367. this.saveLoading = false;
  368. }).catch(err => {
  369. this.saveLoading = false;
  370. });
  371. }
  372. },
  373. removeNewSupervisionZcOtherIsMake(arg) {
  374. this.$nextTick(() => {
  375. if (arg.length) {
  376. let len = this.problemForm.zcOtherIsMakeFiles.length;
  377. for (var i = 0; i < arg.length; i++) {
  378. this.$set(this.problemForm.zcOtherIsMakeFiles, len, arg[i]);
  379. len++;
  380. }
  381. }
  382. })
  383. },
  384. rowPreview(row) {
  385. window.open(`${hostUrl}${row.filePath}`, "_blank");
  386. },
  387. rowDelete(row, index) {
  388. this.$confirm(`确定要删除'${row.fileName}', 是否继续?`, {
  389. confirmButtonText: '确定',
  390. cancelButtonText: '取消',
  391. type: 'warning'
  392. }).then(() => {
  393. request.post(`/file/${row.id}`)
  394. .then(res => {
  395. if (res.success) {
  396. this.$message.success("删除成功");
  397. this.problemForm.zcOtherIsMakeFiles.splice(index, 1);
  398. } else {
  399. this.$message.warning(res.message);
  400. }
  401. })
  402. }).catch(() => {
  403. this.$message({
  404. type: 'info',
  405. message: '已取消删除'
  406. });
  407. });
  408. }
  409. }
  410. }
  411. </script>
  412. <style lang="scss">
  413. .wtzgfc_add_pblm {
  414. .w30 {
  415. width: 50%;
  416. }
  417. .el-textarea {
  418. display: block !important;
  419. }
  420. p.p_title {
  421. text-align: left;
  422. font-weight: bold;
  423. }
  424. .el-radio {
  425. margin-bottom: 15px;
  426. }
  427. .zzcl_fj > div {
  428. margin: 0 !important;
  429. }
  430. .zzcl_fj > div > div {
  431. margin: 0 !important;
  432. display: inline-block;
  433. width: 80px !important;
  434. }
  435. .w300 {
  436. width: 180px;
  437. text-align: left;
  438. }
  439. }
  440. </style>