ce949b7c4b87e526f2960b4f9e4357323cb8a992.svn-base 15 KB

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