121db93fe30a2429c0f04dc3586d0339a2b97ea0.svn-base 14 KB

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