f1370868d5a28a6a8b0a0a0e9ec3f2c1dada66b0.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <el-dialog
  3. width="50%"
  4. title="复查结果录入"
  5. @close="closeModal"
  6. :close-on-click-modal="false"
  7. :visible.sync="changeSupervisionVisible">
  8. <el-form ref="problemForm" :rules="rules" :model="problemForm" label-width="260px" class="wtzgfc_add_pblm">
  9. <el-card>
  10. <p class="p_title">复查情况</p>
  11. <el-form-item label="整改情况" required>
  12. <el-input type="textarea" :rows="10" placeholder="请输入内容" v-model="problemForm.pblmMendNote" class="w30">
  13. </el-input>
  14. </el-form-item>
  15. <el-form-item label="整改结果:" style="text-align:left" required>
  16. <el-radio-group v-model="problemForm.pblmMendState">
  17. <el-radio label="1">已整改落实</el-radio>
  18. <el-radio label="2">部分整改落实</el-radio>
  19. <br/>
  20. <br/>
  21. <el-radio label="3">未整改</el-radio>
  22. <el-radio label="4">不具备整改条件</el-radio>
  23. </el-radio-group>
  24. </el-form-item>
  25. </el-card>
  26. <el-card style="margin: 20px 0;">
  27. <p class="p_title">佐证材料</p>
  28. <el-form-item class="zzcl_fj">
  29. <uploadZz
  30. ref="uploadZzcl"
  31. :url="`/pdcApi/file/insert?bizId=${problData.rgstrId}&bizType=MEND_PROV`"
  32. accept=".pdf,.PDF,.doc,.DOC,.DOCX,.docx,.excel,.EXCEL"
  33. @uploadOver="removeNewSupervision"
  34. ></uploadZz>
  35. <!--url="`/pdcApi/file/insert?bizId=${addObj.id}&bizType=zcWaterIsMake`"-->
  36. <!--<upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>-->
  37. </el-form-item>
  38. <el-form-item label="上传列表" v-if="problemForm.gwComFiles.length">
  39. <ul v-for="(item,index) in problemForm.gwComFiles" :key="index">
  40. <li style="list-style: none;" v-if="item.bizType == 'MEND_PROV'">
  41. <el-button type="text" class="w300">{{ item.fileName }}</el-button>
  42. <el-button type="text" @click="rowPreview(item)">下载</el-button>
  43. <el-button type="text" @click="rowDelete(item,index,'qt')" class="font_red">删除</el-button>
  44. </li>
  45. </ul>
  46. </el-form-item>
  47. </el-card>
  48. <el-row>
  49. <el-form-item style="margin: 20px">
  50. <el-button type="primary" @click="onSubmit('problemForm')" style="width: 100px;float:right"
  51. :loading="saveLoading">保存
  52. </el-button>
  53. </el-form-item>
  54. </el-row>
  55. </el-form>
  56. </el-dialog>
  57. </template>
  58. <script>
  59. import request from '@util/gw_ajax_request.js'
  60. import {hostUrl} from '@util/global_variable'
  61. import {showDetailsXq1} from "@api/InspectionReport.js";
  62. export default {
  63. props: ['objId', 'objName', 'villType', 'objType', 'problemMiddleType', 'problemSmallType', 'engId', 'currentObjectRgstrId', 'problData', 'currentProblemId', 'currentResCode', 'currentAdCode', 'currentRsvrNm', 'problemId'],
  64. data() {
  65. return {
  66. problemForm: {
  67. "rgstrId": this.problData.rgstrId,
  68. "objId": this.problData.objId,
  69. "id": this.problData.id,
  70. "taskId": "",
  71. "stepId": "",
  72. "oldPblmId": "",
  73. "pblmMendNote": "",
  74. "pblmMendState": "",
  75. "gwComFiles": []
  76. },
  77. inspPblmCate: "",
  78. imgList: [],
  79. videoList: [],
  80. audioList: [],
  81. pblmStat: '',
  82. gwComFiles: [],
  83. problemList: [],
  84. t1: '',
  85. t2: '',
  86. t3: '',
  87. xiangqingmiaoshu: '',
  88. wenTiLeiBie: "",
  89. jianChaXiangMu: "",
  90. rules: {
  91. inspPblmDesc: [{
  92. required: true,
  93. message: '请输入描述',
  94. trigger: 'blur'
  95. },
  96. ],
  97. },
  98. saveLoading: false,
  99. changeSupervisionVisible: true
  100. }
  101. },
  102. components: {
  103. uploadZz: resolve => {
  104. require(["@widget/uploadPdf.vue"], resolve);
  105. }
  106. },
  107. computed: {
  108. recPers() {
  109. return localStorage.getItem('userid') ? localStorage.getItem('userid') : '';
  110. }
  111. },
  112. mounted() {
  113. this.changeSup(this.problemId)
  114. },
  115. methods: {
  116. async onSubmit(problemForm) {
  117. this.$refs[problemForm].validate((valid) => {
  118. if (valid) {
  119. this.problemForm["recPers"] = this.recPers;
  120. if (!this.problemForm.pblmMendNote) {
  121. this.$message.warning('请填写整改情况');
  122. return;
  123. }
  124. if (!this.problemForm.pblmMendState) {
  125. this.$message.warning('请选择整改结果');
  126. return;
  127. }
  128. // this.problemForm.rgstrId = this.currentObjectRgstrId;
  129. // this.problemForm.rsName = this.currentRsvrNm;
  130. // this.problemForm.adCode = this.currentAdCode;
  131. // this.problemForm.rsCode = this.currentResCode;
  132. // this.problemForm.revwState = '2';//只要添加问题就是已复核状态
  133. // if (!this.problemForm.rectConc) {
  134. // this.$message.warning('请选择整改状态');
  135. // return;
  136. // }
  137. // if (!this.problemForm.rectMsrs) {
  138. // this.$message.warning('请填写整改措施');
  139. // return;
  140. // }
  141. // if (!this.problemForm.auditConc) {
  142. // this.$message.warning('请选择审核状态');
  143. // return;
  144. // }
  145. this.$nextTick(() => {
  146. this.removeNewSupervision();
  147. })
  148. } else {
  149. console.log('error submit!!');
  150. return false;
  151. }
  152. });
  153. },
  154. // 文件上传
  155. submitUpload() {
  156. this.$refs.upload.submit();
  157. },
  158. removeNewSupervision(arg) {
  159. if (arg) {
  160. let len = this.problemForm.gwComFiles.length;
  161. for (var i = 0; i < arg.length; i++) {
  162. this.$set(this.problemForm.gwComFiles, len, arg[i]);
  163. len++;
  164. }
  165. }
  166. if (!this.saveLoading) {
  167. this.saveLoading = true;
  168. request.post('/tac/province/pblm/info', this.problemForm).then(res => {
  169. if (res.success) {
  170. this.$message.success('保存成功');
  171. this.$emit('dialogClose');
  172. this.$refs.uploadZzcl.init();
  173. }
  174. this.saveLoading = false;
  175. }).catch(err => {
  176. this.saveLoading = false;
  177. });
  178. }
  179. },
  180. rowPreview(row) {
  181. window.open(`${hostUrl}${row.filePath}`, "_blank");
  182. },
  183. rowDelete(row, index) {
  184. this.$confirm(`确定要删除'${row.fileName}', 是否继续?`, {
  185. confirmButtonText: '确定',
  186. cancelButtonText: '取消',
  187. type: 'warning'
  188. }).then(() => {
  189. request.post(`/file/${row.id}`)
  190. .then(res => {
  191. if (res.success) {
  192. this.$message.success("删除成功");
  193. this.problemForm.gwComFiles.splice(index, 1);
  194. } else {
  195. this.$message.warning(res.message);
  196. }
  197. })
  198. }).catch(() => {
  199. this.$message({
  200. type: 'info',
  201. message: '已取消删除'
  202. });
  203. });
  204. },
  205. closeModal() {
  206. this.$emit('dialogClose')
  207. },
  208. // 修改弹窗显示
  209. changeSup(id) {
  210. // this.pictureArray = [];
  211. // this.audioArray = [];
  212. // this.videoArray = [];
  213. // this.fileArray = [];
  214. // this.updateIdXiuGai = id;
  215. showDetailsXq1(id).then(res => {
  216. // if(this.usersId==)
  217. this.problemForm = res.data;
  218. this.problemForm.gwComFiles = res.data.gwComFileList;
  219. // this.gwComFiles = res.data.gwComFileList;
  220. // this.keyword = this.changeSupervision.tacObjPblmstb ? this.changeSupervision.tacObjPblmstb.id : ''
  221. // if (this.changeSupervision.pblmSubjectList) {
  222. // this.unitArray = this.changeSupervision.pblmSubjectList
  223. // }
  224. // if (this.changeSupervision.tacObjPblmstb) {
  225. // this.objSubjectList = this.changeSupervision.tacObjPblmstb.objSubjectList
  226. // this.cateObjList = this.changeSupervision.tacObjPblmstb.cateObjList
  227. // this.changeSupervision.pblmsDesc = this.changeSupervision.tacObjPblmstb.pblmsDesc
  228. // this.changeSupervision.relativeLaw = this.changeSupervision.tacObjPblmstb.relativeLaw
  229. // this.changeSupervision.lawContent = this.changeSupervision.tacObjPblmstb.lawContent
  230. // this.changeSupervision.note = this.changeSupervision.tacObjPblmstb.note
  231. // this.changeSupervision.pblmQlttvCd = this.changeSupervision.pblmQlttvCd ? this.changeSupervision.pblmQlttvCd.toString() : ''
  232. // this.relCode = this.changeSupervision.pblmNm.substr(0, 3)
  233. // if (this.unitArray.length) {
  234. // this.unitArray.forEach((ele, index) => {
  235. // _this.getUnitNameList(index)
  236. // })
  237. // }
  238. // res.data.gwComFileList.forEach(item => {
  239. // if (
  240. // item.fileExt == "mp3" ||
  241. // item.fileExt == "MP3" ||
  242. // item.fileExt == "m4a"
  243. // ) {
  244. // this.audioArray.push(item);
  245. // } else if (
  246. // item.fileExt == "jpg" ||
  247. // item.fileExt == "JPG" ||
  248. // item.fileExt == "png" ||
  249. // item.fileExt == "PNG" ||
  250. // item.fileExt == "JPEG" ||
  251. // item.fileExt == "jpeg"
  252. // ) {
  253. // this.pictureArray.push(item);
  254. // } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  255. // this.videoArray.push({
  256. // width: "130",
  257. // height: "130",
  258. // autoplay: false,
  259. // muted: true,
  260. // language: "en",
  261. // playbackRates: [0.7, 1.0, 1.5, 2.0],
  262. // sources: [
  263. // {
  264. // type: "video/mp4",
  265. // src: this.hostUrl + item.filePath
  266. // }
  267. // ],
  268. // id: item.id
  269. // });
  270. // } else {
  271. // this.fileArray.push(item);
  272. // }
  273. // });
  274. //
  275. // this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  276. // this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  277. // this.videotabName = "视频资料(" + this.videoArray.length + ")";
  278. // this.filetabName = "其它资料(" + this.fileArray.length + ")";
  279. });
  280. },
  281. }
  282. }
  283. </script>
  284. <style lang="scss">
  285. .wtzgfc_add_pblm {
  286. .w30 {
  287. width: 50%;
  288. }
  289. .el-textarea {
  290. display: block !important;
  291. }
  292. p.p_title {
  293. text-align: left;
  294. font-weight: bold;
  295. }
  296. .el-radio {
  297. margin-bottom: 15px;
  298. }
  299. /*.zzcl_fj > div {*/
  300. /*margin: 0 !important;*/
  301. /*}*/
  302. .zzcl_fj > div > div {
  303. margin: 0 !important;
  304. display: inline-block;
  305. width: 80px !important;
  306. }
  307. .w300 {
  308. width: 180px;
  309. text-align: left;
  310. }
  311. }
  312. </style>