From f6082c04ca8c98c1f130d88585d8e7cf67175279 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期三, 05 三月 2025 17:41:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/standard/standardLibrary/index.vue | 1 src/assets/styles/variables.scss | 32 ++-- src/views/CNAS/process/sampleDisposal/index.vue | 3 src/views/business/rawMaterialInspection/index.vue | 4 src/views/business/reportPreparation/index.vue | 5 src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue | 10 + src/api/business/rawMaterialOrder.js | 2 src/views/business/inspectionTask/inspection.vue | 17 +- src/views/business/productOrder/index.vue | 28 ++- src/views/business/inspectionTask/index.vue | 10 src/views/business/materialOrder/index.vue | 118 ++++++++++++++++++- src/views/business/productOrder/components/addInspectionDia.vue | 26 +--- src/api/business/productOrder.js | 26 ++++ src/views/performance/manHour/workTimeManagement.vue | 1 src/views/standard/model/index.vue | 5 src/views/system/user/index.vue | 8 - src/api/business/materialInspection.js | 2 src/views/business/materialOrder/copperOrder.vue | 9 src/views/business/materialOrder/customsInspection.vue | 17 +- src/views/performance/class/index.vue | 5 src/views/structural/capabilityAndLaboratory/capability/index.vue | 10 src/components/Table/value-table.vue | 11 - 22 files changed, 225 insertions(+), 125 deletions(-) diff --git a/src/api/business/materialInspection.js b/src/api/business/materialInspection.js index 4104e1c..67401a5 100644 --- a/src/api/business/materialInspection.js +++ b/src/api/business/materialInspection.js @@ -92,7 +92,7 @@ export function rawAllExport(query) { return request({ url: '/rawMaterialOrder/rawAllExport', - method: 'post', + method: 'get', data: query, responseType: "blob" }) diff --git a/src/api/business/productOrder.js b/src/api/business/productOrder.js index e0c49ef..1b991ac 100644 --- a/src/api/business/productOrder.js +++ b/src/api/business/productOrder.js @@ -21,7 +21,7 @@ export function rawAllInsOrderExport(query) { return request({ url: '/insOrder/rawAllInsOrderExport', - method: 'post', + method: 'get', data: query, responseType: "blob" }) @@ -98,3 +98,27 @@ data: query }) } +// 鏍规嵁璁㈠崟id鏌ヨ鏍峰搧 +export function getSampleByOrderId(query) { + return request({ + url: '/insOrder/getSampleByOrderId', + method: 'get', + params: query + }) +} +// 鏍规嵁鏍峰搧id鏌ヨ妫�楠岄」鏍� +export function getProductTreeBySampleId(query) { + return request({ + url: '/insOrder/getProductTreeBySampleId', + method: 'get', + params: query + }) +} +// 娣诲姞閬楁紡鐨勬楠岄」 +export function addOmitOrderProduct(query) { + return request({ + url: '/insOrder/addOmitOrderProduct', + method: 'post', + data: query + }) +} diff --git a/src/api/business/rawMaterialOrder.js b/src/api/business/rawMaterialOrder.js index 48b6b51..f307ca8 100644 --- a/src/api/business/rawMaterialOrder.js +++ b/src/api/business/rawMaterialOrder.js @@ -218,7 +218,7 @@ export function rawAllExport(query) { return request({ url: '/rawMaterialOrder/rawAllExport', - method: 'post', + method: 'get', data: query, responseType: "blob" }) diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index d30e122..3850fd6 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -1,25 +1,25 @@ // base color -$blue:#324157; -$light-blue:#3A71A8; -$red:#C03639; -$pink: #E65D6E; -$green: #30B08F; -$tiffany: #4AB7BD; -$yellow:#FEC171; -$panGreen: #30B08F; +$blue: #324157; +$light-blue: #3a71a8; +$red: #c03639; +$pink: #e65d6e; +$green: #30b08f; +$tiffany: #4ab7bd; +$yellow: #fec171; +$panGreen: #30b08f; // 榛樿鑿滃崟涓婚椋庢牸 -$base-menu-color:#bfcbd9; -$base-menu-color-active:#ffffff; -$base-menu-background:#1890FF; +$base-menu-color: #bfcbd9; +$base-menu-color-active: #ffffff; +$base-menu-background: #3a7bfa; $base-logo-title-color: #ffffff; -$base-menu-light-color:#ffffff; -$base-menu-light-background:#1890FF; +$base-menu-light-color: #ffffff; +$base-menu-light-background: #3a7bfa; $base-logo-light-title-color: #606266; -$base-sub-menu-background:#ffffff; -$base-sub-menu-hover:#001528; +$base-sub-menu-background: #ffffff; +$base-sub-menu-hover: #001528; // 鑷畾涔夋殫鑹茶彍鍗曢鏍� /** @@ -50,5 +50,5 @@ subMenuHover: $base-sub-menu-hover; sideBarWidth: $base-sidebar-width; logoTitleColor: $base-logo-title-color; - logoLightTitleColor: $base-logo-light-title-color + logoLightTitleColor: $base-logo-light-title-color; } diff --git a/src/components/Table/value-table.vue b/src/components/Table/value-table.vue index 4b81343..5269c88 100644 --- a/src/components/Table/value-table.vue +++ b/src/components/Table/value-table.vue @@ -699,10 +699,6 @@ } ) .then((res) => { - if (res.code === 201) { - this.loading = false; - return; - } this.total = res.data.body.total; this.tableHead = res.data.head; this.tableData = res.data.records; @@ -947,9 +943,6 @@ id: row.id, }) .then((res) => { - if (res.code === 201) { - return; - } this.$message.success("鍒犻櫎鎴愬姛"); this.selectList("page"); this.$emit("delete"); @@ -1024,10 +1017,6 @@ }, }) .then((res) => { - if (res.code === 201) { - this.upLoad = false; - return; - } this.$message.success("淇敼鎴愬姛"); this.upDia = false; this.selectList("page"); diff --git a/src/views/CNAS/process/sampleDisposal/index.vue b/src/views/CNAS/process/sampleDisposal/index.vue index f56ae44..8759567 100644 --- a/src/views/CNAS/process/sampleDisposal/index.vue +++ b/src/views/CNAS/process/sampleDisposal/index.vue @@ -519,7 +519,8 @@ delProcessDeal({ id: row.id }).then((res) => { if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); - this.refresh(); + this.page.current = 0; + this.getList(); }); }) .catch(() => { }); diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue index d9ded15..d7df57a 100644 --- a/src/views/business/inspectionTask/index.vue +++ b/src/views/business/inspectionTask/index.vue @@ -376,6 +376,9 @@ formatData: (params) => { return this.urgencyLevel.find((m) => m.value == params).label; }, + formatType: (params) => { + return this.urgencyLevel.find((m) => m.value == params).type; + }, }, { label: "妫�楠岀被鍨�", @@ -394,8 +397,7 @@ prop: "insState", dataType: "tag", formatData: (params) => { - return this.inspectionTaskState.find((m) => m.value == params) - .label; + return this.inspectionTaskState.find((m) => m.value == params).label; }, formatType: (params) => { return this.inspectionTaskState.find((m) => m.value == params).type; @@ -566,7 +568,7 @@ // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫 }; }, - created() { + mounted() { this.getAuthorizedPerson(); this.currentTime = getYearAndMonthAndDays(); this.getDicts("urgency_level").then((response) => { @@ -576,8 +578,6 @@ this.inspectionTaskState = this.dictToValue(response.data); }); this.refreshTable(); - }, - mounted() { this.queryParams.userId = this.userId; }, activated() { diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index e4b841e..182cff4 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -897,15 +897,12 @@ confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning", - }) - .then(() => { - delfile({ id: row.id }).then((res) => { - if (res.code == 201) return; - this.$message.success("鍒犻櫎鎴愬姛"); - this.refresh(); - }); - }) - .catch(() => { }); + }).then(() => { + delfile({ id: row.id }).then((res) => { + this.$message.success("鍒犻櫎鎴愬姛"); + this.getList(); + }); + }).catch(() => { }); }, // 鏂囦欢绠$悊--缁撴潫 @@ -2857,7 +2854,7 @@ this.upLoading = false; if (response.code == 200) { this.$message.success("涓婁紶鎴愬姛"); - this.$refs.fileList.selectList(); + this.getList(); } }, beforeUpload(file) { diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue index 12f55f1..15b20e2 100644 --- a/src/views/business/materialOrder/copperOrder.vue +++ b/src/views/business/materialOrder/copperOrder.vue @@ -617,11 +617,12 @@ mounted() { this.active = this.$route.query.active this.currentId = this.$route.query.currentId + this.getInfoRow(); }, activated() { - if (this.active==1) { - this.getInfoRow(); - } + this.active = this.$route.query.active + this.currentId = this.$route.query.currentId + this.getInfoRow(); }, methods: { getInfoRow() { @@ -1195,7 +1196,7 @@ }, getProNum() { this.sampleSelectionList.forEach((m, i) => { - Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) + Vue.set(this.sampleSelectionList[i], 'proNum', 1) }) this.$refs.sampleTable.doLayout() }, diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index b8c03af..797161c 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -235,7 +235,7 @@ </el-table-column> <el-table-column align="center" label="寰呮椤规暟閲�" prop="quantity" width="105"> <template slot-scope="scope"> - <el-select v-model="scope.row.quantity" :disabled="active>1|| scope.$index !== 0 || sampleList.length > 1" clearable + <el-select v-model="scope.row.quantity" disabled clearable size="small"> <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option> </el-select> @@ -639,11 +639,15 @@ this.currentId = this.$route.query.currentId this.isReport = this.$route.query.isReport this.customsInspection = this.$route.query.customsInspection + this.getInfo(); }, activated() { - if (this.active==1) { - this.getInfo(); - } + this.active = this.$route.query.active + this.orderType = this.$route.query.orderType + this.currentId = this.$route.query.currentId + this.isReport = this.$route.query.isReport + this.customsInspection = this.$route.query.customsInspection + this.getInfo(); }, getInfo() { this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 @@ -900,10 +904,6 @@ this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�') return } - if (!this.sampleList.every(m => m.quantity)) { - this.$message.error('璇烽�夋嫨寰呮椤规暟閲�') - return - } const sampleList = this.HaveJson(this.sampleList) sampleList.forEach(item => { item.insProduct = this.productList @@ -1021,7 +1021,6 @@ }), }).then(res => { this.noNeedCheckLoad = false - if (res.code == 201) return this.noNeedCheckDia = false this.$message.success('宸叉彁浜�') this.closeOpenPage() diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue index 783010f..4b4bbc4 100644 --- a/src/views/business/materialOrder/index.vue +++ b/src/views/business/materialOrder/index.vue @@ -359,8 +359,42 @@ tableData2: [], tableLoading2: false, column2: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode',width: "160px", }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -472,8 +506,42 @@ tableData3: [], tableLoading3: false, column3: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode',width: "160px", }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -538,8 +606,42 @@ tableData4: [], tableLoading4: false, column4: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode',width: "160px", }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -1077,8 +1179,8 @@ this.outLoading = true rawAllExport({ entity: entity }).then(res => { this.outLoading = false - let url = this.javaApi + '/word/' + res.data - this.$download.saveAs(url, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx'); + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx'); }) }, // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅 diff --git a/src/views/business/productOrder/components/addInspectionDia.vue b/src/views/business/productOrder/components/addInspectionDia.vue index 3872bff..f72ecc4 100644 --- a/src/views/business/productOrder/components/addInspectionDia.vue +++ b/src/views/business/productOrder/components/addInspectionDia.vue @@ -46,7 +46,7 @@ title="娣诲姞妫�楠岄」" width="90%"> <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" border class="el-table" - max-height="700px" style="margin-bottom: 10px;" tooltip-effect="dark" + max-height="580px" tooltip-effect="dark" @selection-change="selectProduct"> <el-table-column type="selection" width="65"></el-table-column> <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column> @@ -105,6 +105,8 @@ </template> <script> +import {addOmitOrderProduct, getProductTreeBySampleId, getSampleByOrderId} from "@/api/business/productOrder"; + export default { name: "addInspectionDia", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -132,10 +134,7 @@ methods: { getDataList(row) { this.dialogVisible = true - this.$axios.get(this.$api.insOrder.getSampleByOrderId + '?insOrderId=' + row.id).then(res => { - if (res.code === 201) { - return - } + getSampleByOrderId({insOrderId: row.id}).then(res => { this.sampleList = res.data }) }, @@ -143,11 +142,8 @@ this.itemDialogVisible = true this.getProductLoad = true this.id=row.id - this.$axios.get(this.$api.insOrder.getProductTreeBySampleId + '?insSampleId=' + row.id).then(res => { + getProductTreeBySampleId({insSampleId: row.id}).then(res => { this.getProductLoad = false - if (res.code === 201) { - return - } this.productList = res.data }).catch(err => { this.getProductLoad = false @@ -170,16 +166,8 @@ type: 'warning' }).then(() => { this.upLoad = true - this.$axios.post(this.$api.insOrder.addOmitOrderProduct,{insProductBindingList:this.productListSelected,insSampleId:this.id}, { - headers: { - "Content-Type": "application/json" - }, - noQs: true - } ).then(res => { + addOmitOrderProduct({insProductBindingList:this.productListSelected,insSampleId:this.id}).then(res => { this.upLoad = false - if (res.code === 201) { - return - } this.$message.success('娣诲姞鎴愬姛锛�') this.itemDialogVisible = false }).catch(err => { @@ -188,7 +176,7 @@ }).catch(() => { this.$message({ type: 'info', - message: '宸插彇娑堝垹闄�' + message: '宸插彇娑堟坊鍔�' }); }); }, diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index f7e3f8c..61af313 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -316,6 +316,7 @@ } from "@/api/business/productOrder"; import { selectUserCondition } from "@/api/performance/class"; import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder"; +import {mapGetters} from "vuex"; // import Inspection from "../do/b1-inspect-order-plan/Inspection.vue"; export default { components: { @@ -736,6 +737,9 @@ } } }, + computed: { + ...mapGetters(["nickName"]), + }, mounted() { this.refreshTable() this.getAuthorizedPerson() @@ -869,8 +873,8 @@ // 瀵煎嚭璁板綍 downLoad() { rawAllInsOrderExport({ ...this.entity }).then(res => { - let url = this.javaApi + '/word/' + res.data - this.$download.saveAs(url, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx'); + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx'); }).catch(err => { console.log('err---', err); }) @@ -1183,15 +1187,17 @@ if (row.userName) { inspectorList = row.userName.split(',') } - let user = JSON.parse(localStorage.getItem('user')) - if (user) { - inspectorList.push(user.name) - } - this.inspectorList = inspectorList - this.sonLaboratory = row.sonLaboratory - this.state = 3; - this.typeSource = row.typeSource - this.orderId = row.id + inspectorList.push(this.nickName) + this.$router.push({ + path: "/inspectionTask/inspection", + query: { + sonLaboratory: row.sonLaboratory, + state: 3, + typeSource: row.typeSource, + orderId: row.id, + inspectorList: inspectorList, + }, + }) }, goback() { this.state = 0 diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue index 266c6cd..0a6bcdf 100644 --- a/src/views/business/rawMaterialInspection/index.vue +++ b/src/views/business/rawMaterialInspection/index.vue @@ -792,8 +792,8 @@ entity: entity }).then(res => { this.outLoading = false - let url = this.javaApi + '/word/' + res.data - this.$download.saveAs(url, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx"); + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx"); }) }, clear() { diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue index 29da53d..d47b9cf 100644 --- a/src/views/business/reportPreparation/index.vue +++ b/src/views/business/reportPreparation/index.vue @@ -600,8 +600,11 @@ this.outLoading = true downAll({ ids: str }).then(res => { this.outLoading = false - this.$download.saveAs(this.javaApi + res.message, row.fileName); + this.$download.zip(res.data, '鎶ュ憡.zip'); + }).catch(() => { + this.outLoading = false }) + }, beforeUpload(file) { const isZip = file.type === 'application/zip' || file.name.endsWith('.zip'); diff --git a/src/views/performance/class/index.vue b/src/views/performance/class/index.vue index 31ac64c..4a318ef 100644 --- a/src/views/performance/class/index.vue +++ b/src/views/performance/class/index.vue @@ -530,7 +530,6 @@ laboratory: this.query.laboratory, }).then((res) => { this.pageLoading = false; - if (res.code == 201) return; this.total = res.data.page.total; this.list = res.data.page.records.map((item) => { for (let key in item.monthlyAttendance) { @@ -551,7 +550,9 @@ }; this.weeks.push(obj); }); - }); + }).catch(() => { + this.pageLoading = false; + }) }, initYear() { this.pageLoading = true; diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue index 2f10f73..9e7a9c0 100644 --- a/src/views/performance/manHour/workTimeManagement.vue +++ b/src/views/performance/manHour/workTimeManagement.vue @@ -637,7 +637,6 @@ }) .then(() => { deleteAuxiliaryWorkingHoursDay({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refreshTable("page"); }); diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue index ab46ae4..418c55b 100644 --- a/src/views/standard/model/index.vue +++ b/src/views/standard/model/index.vue @@ -226,7 +226,6 @@ delete params.id; addStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("鏂板鎴愬姛"); @@ -241,7 +240,6 @@ params.thing = this.copyForm.thing ? this.copyForm.thing : ""; upStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("淇敼鎴愬姛"); @@ -255,7 +253,6 @@ case "澶嶅埗妯$増": copyStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("澶嶅埗鎴愬姛"); @@ -286,7 +283,6 @@ }) .then(() => { delStandardTemplate({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refreshTable("page"); }); @@ -360,7 +356,6 @@ thing: JSON.stringify(data), name: luckysheet.getWorkbookName(["name"]), }).then((res) => { - if (res.code == 201) return; this.loading = false; this.$message.success("宸蹭繚瀛�"); this.isShow = false; diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue index 713c062..dab88fd 100644 --- a/src/views/standard/standardLibrary/index.vue +++ b/src/views/standard/standardLibrary/index.vue @@ -778,7 +778,6 @@ } this.selectTree = data2.replace(" - ", ""); delStandardTree({ tree: this.selectTree }).then((res) => { - if (res.code == 201) return; this.$message.success("宸插垹闄�"); let arr = this.selectTree.split(" - "); this.deleteStandard(this.list, arr[arr.length - 1]); diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue index 713b339..96083ab 100644 --- a/src/views/structural/capabilityAndLaboratory/capability/index.vue +++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue @@ -13,7 +13,7 @@ style="display: inline;margin-right: 8px" :action="uploadAction1" :before-upload="beforeUpload1" :headers="token" :on-error="onError1" - :on-success="handleSuccessUp" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> + :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> <el-button size="small" type="primary">瀵煎叆</el-button> </el-upload> <el-button size="small" type="primary" v-if="radio === 1" @click="uploadDia = true">瀵煎叆</el-button> @@ -430,10 +430,10 @@ return true; } }, - handleSuccessUp (response, file, fileList) { - this.$refs.upload.clearFiles() - if (response.code === 201) { - this.$message.error(response.message) + handleSuccessUp1 (response, file, fileList) { + this.$refs.upload1.clearFiles() + if (response.code !== 200) { + this.$message.error(response.msg) return } this.$message.success('涓婁紶鎴愬姛') diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue index 3543847..4755b92 100644 --- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue +++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue @@ -143,7 +143,7 @@ <el-col :span="12"> <el-form-item label="璇曢獙鏂规硶锛�" prop="method"> <el-select v-model="editForm.method" clearable multiple placeholder="璇烽�夋嫨" size="small" style="width: 100%"> - <el-option v-for="item in methodList" :key="item.value" :label="item.label" :value="item.value"></el-option> + <el-option v-for="item in methodList" :key="item.value" :label="item.label" :value="item.label"></el-option> </el-select> </el-form-item> </el-col> @@ -317,7 +317,11 @@ let obj = this.HaveJson(this.editForm) obj.method = JSON.stringify(obj.method) obj.sample = JSON.stringify(obj.sample) - obj.radiusList = JSON.stringify(obj.radiusList) + if (obj.radiusList?.length > 0) { + obj.radiusList = JSON.stringify(obj.radiusList) + } else { + obj.radiusList = null + } if(obj.id){ // 淇敼 upItemParameter(obj).then(res => { @@ -387,7 +391,7 @@ res.data.forEach(a => { data.push({ label: a.code, - value: a.code + value: a.id, }) }) this.methodList = data diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0d8450a..9bbfd25 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -448,10 +448,6 @@ } this.addLoad = true addDepartment(this.addOb).then(res => { - if (res.code === 201) { - this.addLoad = false - return - } this.$message.success('娣诲姞鎴愬姛') this.addDia = false this.getList() @@ -656,10 +652,6 @@ person: this.multipleSelection, roleId: this.componentData.entity.roleId }).then(res => { - if (res.code === 201) { - this.addLoad = false - return - } this.$message.success('鎿嶄綔鎴愬姛') this.multipleSelection = [] this.$refs.personTable.clearSelection() -- Gitblit v1.9.3