5ed148e7 by xiaomiao

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 97f53c8a b8917a94
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-28 14:59:55 4 * @LastEditTime: 2023-07-31 15:43:30
5 --> 5 -->
6 <template> 6 <template>
7 <div class="rlPopup"> 7 <div class="rlPopup">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 <div class="thumb-wrap"> 23 <div class="thumb-wrap">
24 <div class="thumb-wrap-button"> 24 <div class="thumb-wrap-button">
25 <el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button> 25 <el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button>
26 <el-upload class="fileUpdate" ref="upload" action="" :show-file-list="false" :multiple="true" :auto-upload="false" 26 <el-upload class="fileUpdate" ref="upload" :key="key" action="" :show-file-list="false" :multiple="true" :auto-upload="false"
27 :on-change="handleChange" 27 :on-change="handleChange"
28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> 28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload">
29 <el-button icon="el-icon-upload" type="primary" v-if="ableOperation">上传</el-button> 29 <el-button icon="el-icon-upload" type="primary" v-if="ableOperation">上传</el-button>
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
70 }, 70 },
71 data () { 71 data () {
72 return { 72 return {
73 key: 0,
73 isScan: false, 74 isScan: false,
74 // 打开高拍仪 75 // 打开高拍仪
75 scanTitle: '打开高拍仪', 76 scanTitle: '打开高拍仪',
...@@ -223,28 +224,20 @@ ...@@ -223,28 +224,20 @@
223 clickImage () { 224 clickImage () {
224 this.showViewer = true 225 this.showViewer = true
225 }, 226 },
226 // 上传
227 /** 227 /**
228 * @description: 上传 228 * @description: 上传
229 * @param {*} file 229 * @param {*} file
230 * @author: renchao 230 * @author: renchao
231 */ 231 */
232 beforeUpload (file) { 232 beforeUpload (file) {
233 const isJPEG = file.type === 'image/jpeg' 233 const isLt5M = file.size / 1024 / 1024 < 5;
234 const isPNG = file.type === 'image/png'
235 const isJPG = file.type === 'image/jpg'
236 const isGIF = file.type === 'image/gif'
237 const isLt5M = file.size / 1024 / 1024 < 5
238 if (!isJPEG && !isGIF && !isPNG && !isJPG && !isGIF) {
239 this.$message.error('请选择jpeg/png/jpg/bmp/gif格式的图片后重试')
240 this.loading = false
241 }
242 if (!isLt5M) { 234 if (!isLt5M) {
243 this.$message.error('上传图片大小不能超过 5MB!') 235 this.$message.error('上传图片大小不能超过 5MB!');
244 this.loading = false 236 return false;
245 } 237 }
246 this.imgHidden = (isJPG || isJPEG || isPNG || isGIF) && isLt5M 238
247 return this.imgHidden 239 // 所有条件满足时返回 true
240 return true;
248 }, 241 },
249 /** 242 /**
250 * @description: handleChange 243 * @description: handleChange
...@@ -253,17 +246,28 @@ ...@@ -253,17 +246,28 @@
253 * @author: renchao 246 * @author: renchao
254 */ 247 */
255 async handleChange (file, fileList) { 248 async handleChange (file, fileList) {
249 if (!this.beforeUpload(file)) return
256 let length = fileList.length; 250 let length = fileList.length;
257 this.maxFileLength = Math.max(length, this.maxFileLength) 251 this.maxFileLength = Math.max(length, this.maxFileLength)
258 console.log(fileList, this.maxFileLength, 'this.maxFileLength');
259 var formData = new FormData(); 252 var formData = new FormData();
260 setTimeout(() => { 253 setTimeout(() => {
261 if (this.maxFileLength !== length) { 254 if (this.maxFileLength !== length) {
262 return 255 return
263 } 256 }
257 let num = 0
264 fileList.forEach(item => { 258 fileList.forEach(item => {
265 formData.append('file', item.raw) 259 if (!['image/jpeg', 'image/png', 'image/jpg', 'image/gif'].includes(item.raw.type)) {
260 num++
261 } else {
262 formData.append('file', item.raw)
263 }
266 }) 264 })
265 if (num >= 1) {
266 this.$message.error("请选择jpeg/png/jpg/bmp/gif格式的图片后重试")
267 // 移除不支持的文件类型
268 this.key++
269 return;
270 }
267 formData.append("bsmSj", this.previewImg.bsmSj); 271 formData.append("bsmSj", this.previewImg.bsmSj);
268 formData.append("bsmSlsq", this.previewImg.bsmSlsq); 272 formData.append("bsmSlsq", this.previewImg.bsmSlsq);
269 uploadBatch(formData).then((res) => { 273 uploadBatch(formData).then((res) => {
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-28 11:37:31 4 * @LastEditTime: 2023-07-31 13:59:45
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clxx"> 7 <div class="clxx">
...@@ -253,7 +253,8 @@ ...@@ -253,7 +253,8 @@
253 //查看明细 253 //查看明细
254 viewDetail () { 254 viewDetail () {
255 this.$popupDialog("查看明细", "workflow/components/dialog/clxxDetailDialog", { 255 this.$popupDialog("查看明细", "workflow/components/dialog/clxxDetailDialog", {
256 data: this.tableData 256 data: this.tableData,
257 unitData: this.$parent.unitData
257 }, "60%") 258 }, "60%")
258 }, 259 },
259 //设置tableData 260 //设置tableData
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-28 09:35:42 4 * @LastEditTime: 2023-07-31 14:27:07
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clmlmx-box"> 7 <div class="clmlmx-box">
8 <div class="title">申请材料目录</div> 8 <div class="title">申请材料目录</div>
9 <lb-table :column="column" :key="key" :heightNumSetting="true" :pagination="false" :data="formData.data"> 9 <lb-table :column="column" :key="key" :heightNumSetting="true" :calcHeight="600" :pagination="false" :data="tableData">
10 </lb-table> 10 </lb-table>
11 <div class="text-center"> 11 <div class="text-center">
12 <el-button @click="$popupCacel">取消</el-button> 12 <el-button @click="$popupCacel">取消</el-button>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
14 </div> 14 </div>
15 </template> 15 </template>
16 <script> 16 <script>
17 import Vue from 'vue'
17 import store from '@/store/index.js' 18 import store from '@/store/index.js'
18 import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js"; 19 import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js";
19 export default { 20 export default {
...@@ -38,21 +39,21 @@ ...@@ -38,21 +39,21 @@
38 label: "是否必选", 39 label: "是否必选",
39 width: "80", 40 width: "80",
40 render: (h, scope) => { 41 render: (h, scope) => {
41 if (scope.row.sfxjcl === "1") { 42 if (scope.row.isrequired === "1") {
42 return ( 43 return (
43 <div> 44 <div>
44 <span></span> 45 <span></span>
45 </div> 46 </div>
46 ); 47 );
47 } 48 }
48 else { 49 else {
49 return ( 50 return (
50 <div> 51 <div>
51 <span></span> 52 <span></span>
52 </div> 53 </div>
53 ); 54 )
54 } 55 }
55 }, 56 }
56 }, 57 },
57 { 58 {
58 prop: "sjmc", 59 prop: "sjmc",
...@@ -67,13 +68,23 @@ ...@@ -67,13 +68,23 @@
67 <div> 68 <div>
68 <span>{this.dicStatus(scope.row.sjlx, "A40")}</span> 69 <span>{this.dicStatus(scope.row.sjlx, "A40")}</span>
69 </div> 70 </div>
70 ); 71 )
71 }, 72 }
72 }, 73 },
73 { 74 {
74 prop: "sjsl", 75 prop: "sjsl",
75 label: "份数", 76 label: "份数",
76 width: "50" 77 width: "50",
78 render: (h, scope) => {
79 return (
80 <div>
81 {
82 scope.row.sjsl ?
83 <span>{scope.row.sjsl}</span> : 1
84 }
85 </div>
86 )
87 }
77 }, 88 },
78 { 89 {
79 prop: "smzt", 90 prop: "smzt",
...@@ -147,11 +158,16 @@ ...@@ -147,11 +158,16 @@
147 tableData: [] 158 tableData: []
148 } 159 }
149 }, 160 },
150 created () { 161 watch: {
151 console.log(this.formData.data, 'formData'); 162 'formData.data': {
163 handler: function (val, oldVal) {
164 this.tableData = _.cloneDeep(val)
165 },
166 immediate: true,
167 deep: true
168 }
152 }, 169 },
153 methods: { 170 methods: {
154 // 材料目录明细初始化
155 /** 171 /**
156 * @description: 材料目录明细初始化 172 * @description: 材料目录明细初始化
157 * @author: renchao 173 * @author: renchao
...@@ -160,24 +176,24 @@ ...@@ -160,24 +176,24 @@
160 return new Promise(resolve => { 176 return new Promise(resolve => {
161 this.unitData = this.$parent.unitData; 177 this.unitData = this.$parent.unitData;
162 var formdata = new FormData(); 178 var formdata = new FormData();
163 formdata.append("bsmSldy", this.unitData[0]?.bsmSldy); 179 formdata.append("bsmSldy", this.formData.unitData[0]?.bsmSldy);
164 formdata.append("bsmSlsq", this.$route.query.bsmSlsq); 180 formdata.append("bsmSlsq", Vue.prototype.$currentRoute.query.bsmSlsq);
165 formdata.append("clfl", 2); 181 formdata.append("clfl", 2);
166 InitClml(formdata).then((res) => { 182 InitClml(formdata).then((res) => {
167 if (res.code == 200) { 183 if (res.code == 200) {
168 resolve(res.code) 184 resolve(res.code)
169 if (res.result && res.result.length > 0) { 185 if (res.result && res.result.length > 0) {
170 this.data = res.result; 186 this.tableData = res.result;
171 } else { 187 } else {
172 this.data = [] 188 this.tableData = []
173 } 189 }
190 console.log(this.tableData, 'this.tableData');
174 } else { 191 } else {
175 this.$message.error(res.message) 192 this.$message.error(res.message)
176 } 193 }
177 }) 194 })
178 }) 195 })
179 }, 196 },
180 // 上移
181 /** 197 /**
182 * @description: 上移 198 * @description: 上移
183 * @param {*} index 199 * @param {*} index
...@@ -199,14 +215,12 @@ ...@@ -199,14 +215,12 @@
199 message: '上移成功', 215 message: '上移成功',
200 type: 'success' 216 type: 'success'
201 }) 217 })
202 this.$parent.setTableData(this.data)
203 } 218 }
204 } else { 219 } else {
205 this.$message.error(res.message); 220 this.$message.error(res.message);
206 } 221 }
207 }) 222 })
208 }, 223 },
209 // 下移
210 /** 224 /**
211 * @description: 下移 225 * @description: 下移
212 * @param {*} index 226 * @param {*} index
...@@ -256,7 +270,6 @@ ...@@ -256,7 +270,6 @@
256 message: "删除成功", 270 message: "删除成功",
257 type: "success", 271 type: "success",
258 }) 272 })
259 // this.$parent.setTableData(this.data)
260 } 273 }
261 } 274 }
262 }) 275 })
...@@ -293,7 +306,6 @@ ...@@ -293,7 +306,6 @@
293 @import "~@/styles/mixin.scss"; 306 @import "~@/styles/mixin.scss";
294 .clmlmx-box { 307 .clmlmx-box {
295 margin: 0 auto; 308 margin: 0 auto;
296
297 .title { 309 .title {
298 text-align: center; 310 text-align: center;
299 height: 60px; 311 height: 60px;
......