From 42ea8c6cba21c555e254ac41ce976d7c2f9366f6 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期日, 12 五月 2024 08:01:16 +0800 Subject: [PATCH] 各bug修复 --- src/components/view/b2-standard.vue | 34 +++++ src/view/notice.vue | 6 src/components/do/b1-inspect-order-plan/Inspection.vue | 252 +++++++++++++++++++++++++++-------------- src/components/view/b1-inspect-order-plan.vue | 6 src/components/view/b1-inspection-order.vue | 6 src/App.vue | 4 src/view/index.vue | 1 src/components/view/notice-detail.vue | 19 ++- 8 files changed, 219 insertions(+), 109 deletions(-) diff --git a/src/App.vue b/src/App.vue index 834f3fb..500f742 100644 --- a/src/App.vue +++ b/src/App.vue @@ -151,7 +151,7 @@ .cell { color: #333; - padding: 0 17px !important; + padding: 0 15px !important; font-size: 12px; } @@ -172,7 +172,7 @@ font-size: 14px; font-weight: 400; color: #333; - padding: 6px 17px !important; + padding: 6px 15px !important; } /* 鍏ㄥ眬鍒嗛〉鍣ㄦ牱寮� */ diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 24d4b14..e0ff6ed 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -132,32 +132,32 @@ color: #303133; } - .inspection .el-input-group__append{ + .inspection .el-input-group__append { padding: 0 10px; color: #3A7BFA; background-color: #fff; } - .inspection .center-box .el-input__inner{ + .inspection .center-box .el-input__inner { font-size: 12px; padding: 0 6px; text-align: center; } - .inspection .el-textarea__inner{ + .inspection .el-textarea__inner { padding: 2px; } - .inspection .el-textarea__inner::-webkit-scrollbar{ + .inspection .el-textarea__inner::-webkit-scrollbar { width: 0; } - .inspection .el-select{ + .inspection .el-select { display: flex; align-items: center; } - .inspection .el-textarea__inner{ + .inspection .el-textarea__inner { min-height: 100% !important; } </style> @@ -168,7 +168,8 @@ <el-col :span="12" style="text-align: right;"> <el-button size="small" type="primary" @click="sampleVisible=true">鏍峰搧鍒囨崲</el-button> <el-button size="small" type="primary" @click="taskVisible=true">浠诲姟鍒囨崲</el-button> - <el-button size="small" type="primary" @click="submit" v-show="state==1" :loading="submitLoading">鎻愪氦</el-button> + <el-button size="small" type="primary" @click="addVerifyDia = true" v-show="state==1" + :loading="submitLoading">鎻愪氦</el-button> <!-- 澶嶆牳 --> <el-button size="medium" type="primary" @click="upInsReview(1)" :loading="reviewLoading" v-show="state>1">閫氳繃</el-button> @@ -207,8 +208,8 @@ <div class="center"> <div class="search"> <el-radio-group v-model="currentTable" size="small"> - <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" - :key="index" size="small">{{ item.templateName }}</el-radio-button> + <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" :key="index" + size="small">{{ item.templateName }}</el-radio-button> </el-radio-group> </div> <div class="center-box"> @@ -219,27 +220,29 @@ v-if="n.v.mc==undefined || Object.keys(n.v.mc).length === 4" :colspan="n.v.mc&&n.v.mc.cs?n.v.mc.cs:1" :rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1" :style="`background:${n.v.bg};color:${n.v.fc};font-size:${n.v.fs}px;width:${handleWidth(n)}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl?'bold':''};`"> - <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;`"> + <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" + :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;`"> <template v-if="n.v.ps!=undefined && n.v.ps.value==='妫�楠屽��' && state==1"> <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)"> - <el-button slot="append" type="primary" icon="el-icon-edit" size="mini" v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> + <el-button slot="append" type="primary" icon="el-icon-edit" size="mini" + v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> </el-input> <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea" - v-model="n.v.v" + v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" - @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)"/> - <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" - :disabled="state>1"> - <el-option label="鏄�" value="鏄�"></el-option> - <el-option label="鍚�" value="鍚�"></el-option> + @change="saveInsContext()" /> + <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" + :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()"> + <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option> </el-select> <span :style="`font-family:${n.v.ff} !important;`" v-else-if="getInspectionValueType(n.i) == 4">/</span> </template> <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='缁撹'"> - <el-select v-if="getInspectionValueType(n.i) == 2 && state==1" class="table_input" v-model="n.v.v" @change="saveInsContext()"> + <el-select v-if="(getInspectionValueType(n.i) == 2 || getInspectionValueType(n.i) == 5) && state==1" class="table_input" v-model="n.v.v" + @change="saveInsContext()"> <el-option label="鍚堟牸" :value="1"></el-option> <el-option label="涓嶅悎鏍�" :value="0"></el-option> </el-select> @@ -250,14 +253,24 @@ </template> </template> <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='璁惧缂栫爜' && state==1"> - <el-select v-model="n.v.v" placeholder="璁惧" @visible-change="e=>getEquipOptions(e,n.i)" - remote @change="(val)=>changeEquip(val, n)"> + <el-select v-model="n.v.v" placeholder="璁惧" @visible-change="e=>getEquipOptions(e,n.i)" remote + @change="(val)=>changeEquip(val, n)"> <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </template> <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='瑕佹眰鍊�' && state==1"> <span :style="`font-family:${n.v.ff} !important;`">{{getTell(n.i)}}</span> + </template> + <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏈�缁堝��' && state==1"> + <el-input class="table_input" type="textarea" + :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" + v-model="n.v.v" @change="saveInsContext()" v-if="getInspectionValueType(n.i) == 2"></el-input> + <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" + :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()"> + <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option> + </el-select> + <span v-else :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span> </template> <span v-else :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span> </div> @@ -303,13 +316,27 @@ <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia"> <div class="search_label" style="width: 150px;"><span class="required-span">* </span>涓嶉�氳繃鐨勭悊鐢憋細</div> <div class="search_input" style="width: 100%;"> - <el-input size="small" clearable v-model="noReason" type="textarea" - :autosize="{ minRows: 4}"></el-input> + <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 4}"></el-input> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="reviewDia = false">鍙� 娑�</el-button> <el-button type="primary" @click="handleReviewDia" :loading="reviewLoading">纭� 瀹�</el-button> + </span> + </el-dialog> + <el-dialog title="鎸囧畾澶嶆牳浜哄憳" :visible.sync="addVerifyDia" width="400px"> + <div class="body" style="display: flex;padding: 10px;align-items: center;"> + <div class="search_label" style="width: 150px;"><span class="required-span">*</span>澶嶆牳浜�</div> + <div class="search_input" style="width: 100%;"> + <el-select v-model="verifyUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable> + <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </div> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="addVerifyDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="submit()">纭� 瀹�</el-button> </span> </el-dialog> </div> @@ -380,9 +407,13 @@ reviewDia: false, noReason: '', tableWidth: 1000, - currentTable:null, - tableLists:[], - widthList:[] + currentTable: null, + tableLists: [], + widthList: [], + addVerifyDia: false, + verifyUser: null, + personList: [], + enumList: [] } }, created() { @@ -394,6 +425,7 @@ this.getTypeDicts() this.getInsStateDicts() this.getComparisonList() + this.getAuthorizedPerson() }, watch: { id(val) { @@ -428,10 +460,10 @@ this.currentKey = 1; }) }, - currentTable(val1,val0){ - if(val0!=null&&val1!=val0){ - this.tableLists.forEach((m,i)=>{ - if(m.templateId==val1){ + currentTable(val1, val0) { + if (val0 != null && val1 != val0) { + this.tableLists.forEach((m, i) => { + if (m.templateId == val1) { this.tableList = null; this.tableList = [(this.tableLists[i])]; this.handleTableData() @@ -508,13 +540,24 @@ this.comparisonList = data; }) }, + selectEnumByCategoryOfSelect(val) { + this.enumList = [] + if(val===undefined||val===null){ + return + } + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: val + }).then(res => { + this.enumList = res.data; + }) + }, tableRowClassName({ row, rowIndex }) { row.index = rowIndex + 1; }, - getTableLists(){ + getTableLists() { const mySet1 = new Set(); this.tableLists = this.currentSample.insProduct.filter(m => { let num0 = mySet1.size; @@ -529,7 +572,7 @@ return m } }); - if(this.tableLists&&this.tableLists.length>0){ + if (this.tableLists && this.tableLists.length > 0) { this.tableList = null; this.tableList = [this.tableLists[0]] this.currentTable = this.tableLists[0].templateId; @@ -597,18 +640,19 @@ for (let i in this.currentSample.insProduct) { if (this.currentSample.insProduct[i].templateId === a.templateId && this.currentSample .insProduct[i].inspectionItem + - (this.currentSample.insProduct[i].inspectionItemSubclass==null?'':this.currentSample.insProduct[i].inspectionItemSubclass) - === str) { - ids.push({ - r: b.r, - id: this.currentSample.insProduct[i].id, - product: this.currentSample.insProduct[i] - }) - break + (this.currentSample.insProduct[i].inspectionItemSubclass == null ? '' : this.currentSample + .insProduct[i].inspectionItemSubclass) === + str) { + ids.push({ + r: b.r, + id: this.currentSample.insProduct[i].id, + product: this.currentSample.insProduct[i] + }) + break } count2++ } - if(count2 == this.currentSample.insProduct.length){ + if (count2 == this.currentSample.insProduct.length) { dels.add(b.r) } } @@ -629,7 +673,8 @@ if (a.template[b].v.ps != undefined && a.template[b].v.ps.value === '鍗曚綅') { a.template[b].v.v = id.product.unit } - if (a.template[b].v.ps != undefined && (a.template[b].v.ps.value === '璇曢獙鏂规硶' || a.template[b].v.ps.value === '妫�娴嬫柟娉�')) { + if (a.template[b].v.ps != undefined && (a.template[b].v.ps.value === '璇曢獙鏂规硶' || a.template[b].v + .ps.value === '妫�娴嬫柟娉�')) { a.template[b].v.v = id.product.methodS } } @@ -675,19 +720,19 @@ if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽��') { b.v.v = '' b.u = '' - b.i&&this.param[b.i].insValue.push(b) + b.i && this.param[b.i].insValue.push(b) } if (b.v.ps != undefined && b.v.ps.value === '璁$畻鍊�') { b.v.v = '' - b.i&&this.param[b.i].comValue.push(b) + b.i && this.param[b.i].comValue.push(b) } if (b.v.ps != undefined && b.v.ps.value === '璁惧缂栫爜') { b.v.v = '' - b.i&&this.param[b.i].equipValue.push(b) + b.i && this.param[b.i].equipValue.push(b) } if (b.v.ps != undefined && b.v.ps.value === '璁惧鍚嶇О') { b.v.v = '' - b.i&&this.param[b.i].equipName.push(b) + b.i && this.param[b.i].equipName.push(b) } if (b.v.ps != undefined && b.v.ps.value === '鏈�缁堝��') { b.v.v = '' @@ -698,12 +743,12 @@ } else { this.param[b.i].resValue = b } */ - if(b.i !== undefined){ + if (b.i !== undefined) { this.param[b.i].resValue = b } } if (b.v.ps != undefined && b.v.ps.value === '缁撹') { - if(b.i!==undefined){ + if (b.i !== undefined) { this.param[b.i].insResult = b conclusionList.forEach((n, i) => { if (n.r == b.r && n.c == b.c) { @@ -803,7 +848,7 @@ } }) }) - if (item.methodName == '鑷畾涔夋柟娉�' && item.v.ps!=undefined && item.v.ps.value == '缁撹') { + if (item.methodName == '鑷畾涔夋柟娉�' && item.v.ps != undefined && item.v.ps.value == '缁撹') { if (this.currentSample.insProduct.find(m => m.id == item.i)) { let ask = this.currentSample.insProduct.find(m => m.id == item.i).ask.split('&'); let res = Object.values(comValue)[0] @@ -867,13 +912,13 @@ valueList.forEach(b => { str = str.replace(b.name, b.value) }) - if(item.v.f.includes('/')>-1){ - if(Object.getOwnPropertyNames(comValue).length==valueList.length){ + if (item.v.f.includes('/') > -1) { + if (Object.getOwnPropertyNames(comValue).length == valueList.length) { comResult = eval(str) - }else{ + } else { comResult = '' } - }else{ + } else { comResult = eval(str) } break; @@ -883,7 +928,7 @@ for (var b in a) { if (a[b].c == item.c) { let val = parseFloat(comResult.toFixed(3)) - a[b].v.v = isNaN(val)?'':val + a[b].v.v = isNaN(val) ? '' : val break } } @@ -895,19 +940,19 @@ }) this.getCurrentInsProduct(pId) }, - getCurrentInsProduct(pId){ - if(!this.tableList[0].insProductResult){ + getCurrentInsProduct(pId) { + if (!this.tableList[0].insProductResult) { this.tableList[0].insProductResult = {} } - for (let m in this.param[pId]){ + for (let m in this.param[pId]) { let value = this.param[pId][m] - switch (m){ + switch (m) { case 'comValue': - if(value&&value.length>0){ - this.tableList[0].insProductResult[m]=[]; - value.forEach((a,i)=>{ + if (value && value.length > 0) { + this.tableList[0].insProductResult[m] = []; + value.forEach((a, i) => { let obj = { - v:a.v.v, + v: a.v.v, } this.tableList[0].insProductResult[m].push(obj); }) @@ -915,12 +960,12 @@ this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m]) break; case 'insValue': - if(value&&value.length>0){ - this.tableList[0].insProductResult[m]=[]; - value.forEach((a,i)=>{ + if (value && value.length > 0) { + this.tableList[0].insProductResult[m] = []; + value.forEach((a, i) => { let obj = { - v:a.v.v, - u:a.u, + v: a.v.v, + u: a.u, } this.tableList[0].insProductResult[m].push(obj); }) @@ -928,11 +973,11 @@ this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m]) break; case 'equipValue': - if(value&&value.length>0){ - this.tableList[0].insProductResult[m]=[]; - value.forEach((a,i)=>{ + if (value && value.length > 0) { + this.tableList[0].insProductResult[m] = []; + value.forEach((a, i) => { let obj = { - v:a.v.v, + v: a.v.v, } this.tableList[0].insProductResult[m].push(obj); }) @@ -940,11 +985,11 @@ this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m]) break; case 'equipName': - if(value&&value.length>0){ - this.tableList[0].insProductResult[m]=[]; - value.forEach((a,i)=>{ + if (value && value.length > 0) { + this.tableList[0].insProductResult[m] = []; + value.forEach((a, i) => { let obj = { - v:a.v.v, + v: a.v.v, } this.tableList[0].insProductResult[m].push(obj); }) @@ -992,7 +1037,7 @@ let regex = /[=\+\-\*\%\(\)\/\s]/g let mode = item.v.f.replace(regex, ' ').split(' '); mode.filter(m => m && !Number(m)).forEach(m => { - let r = m.replace(/[a-zA-Z]/g, "") - 1 + let r = m.replace(/[a-zA-Z]/g, "") - 1 let c = this.comparisonList.find(j => j.label == m.split('')[0]).value valueList.push({ c, @@ -1019,15 +1064,15 @@ } } }, - handleWidth(n){ + handleWidth(n) { let sum = 0; - if(n.v.mc&&n.v.mc.cs&&n.v.mc.c!=undefined){ - for(let i=0;i<n.v.mc.cs;i++){ - let num = this.widthList[i+n.v.mc.c]?this.widthList[i+n.v.mc.c]:100 - sum+=num; + if (n.v.mc && n.v.mc.cs && n.v.mc.c != undefined) { + for (let i = 0; i < n.v.mc.cs; i++) { + let num = this.widthList[i + n.v.mc.c] ? this.widthList[i + n.v.mc.c] : 100 + sum += num; } - }else{ - sum = this.widthList[n.c]?this.widthList[n.c]:100 + } else { + sum = this.widthList[n.c] ? this.widthList[n.c] : 100 } return sum }, @@ -1079,6 +1124,17 @@ }).catch(error => { console.error(error) }) + } + }, + getDic(e, id) { + if (e) { + for (var a in this.currentSample.insProduct) { + if (this.currentSample.insProduct[a].id == id) { + let str = this.currentSample.insProduct[a].dic + this.selectEnumByCategoryOfSelect(str) + return str + } + } } }, getUserInfo() { @@ -1134,10 +1190,16 @@ } }, submit() { + if (this.verifyUser === null || this.verifyUser === '') { + this.$message.error("璇锋寚瀹氬鏍镐汉鍛�") + return + } + this.addVerifyDia = false this.submitLoading = true; this.$axios.post(this.$api.insOrderPlan.submitPlan, { orderId: this.orderId, laboratory: this.sonLaboratory, + verifyUser: this.verifyUser }).then(res => { if (res.code === 200) { this.$message.success("鎿嶄綔鎴愬姛") @@ -1149,7 +1211,7 @@ this.submitLoading = false; }) }, - saveInsContext(){ + saveInsContext() { this.$axios.post(this.$api.insOrderPlan.saveInsContext, { param: JSON.stringify(this.param) }).then(res => { @@ -1160,18 +1222,30 @@ this.$message.success('宸蹭繚瀛�') }) }, - changeEquip(val,n){ - for(let i in this.equipOptions){ - if(this.equipOptions[i].value === val){ - for(let i1 in this.param[n.i].equipName){ - if(this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r){ + changeEquip(val, n) { + for (let i in this.equipOptions) { + if (this.equipOptions[i].value === val) { + for (let i1 in this.param[n.i].equipName) { + if (this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r) { this.param[n.i].equipName[i1].v.v = this.equipOptions[i].label } } } } this.saveInsContext() - } + }, + getAuthorizedPerson() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, } } </script> diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue index 56ea018..895743d 100644 --- a/src/components/view/b1-inspect-order-plan.vue +++ b/src/components/view/b1-inspect-order-plan.vue @@ -245,9 +245,9 @@ font: '澶嶆牳', type: 'text', method: 'handleReview', - disabFun: (row, index) => { - return row.userId == null || row.insState != 3 - } + /* disabFun: (row, index) => { + return row.userId == null || row.insState != 3 || row.verifyUser != 1 + } */ }, { id: '', font: '璁ら', diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 66e038b..7ccb0ea 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -167,10 +167,10 @@ </span> </el-dialog> <!-- 涓嬪彂 --> - <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="400px" :before-close="handleClose"> + <el-dialog title="妫�楠屽垎閰�" :visible.sync="issuedDialogVisible" width="400px" :before-close="handleClose"> <div class="body" style="max-height: 60vh;"> <el-row> - <el-col class="search_thing" :span="22"> + <el-col class="search_thing" style="width: 95%;"> <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div> <div class="search_input"> <el-date-picker size="small" v-model="distributeData.appointed" type="date" placeholder="閫夋嫨鏃ユ湡" @@ -178,7 +178,7 @@ </el-date-picker> </div> </el-col> - <el-col class="search_thing" :span="22"> + <el-col class="search_thing" style="width: 95%;"> <div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>鎸囨淳浜哄憳锛�</div> <div class="search_input"> <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable> diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 755a9c9..d75d7ca 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -216,6 +216,13 @@ </template> </el-table-column> <el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column> + <el-table-column prop="templateId" label="妯℃澘" width="200"> + <template slot-scope="scope"> + <el-select v-model="scope.row.templateId" size="small" @change="(value)=>upStandardProductListOfTemplate(value,scope.row.id)"> + <el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option> + </el-select> + </template> + </el-table-column> <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="section" label="鎿嶄綔" width="120"> <template slot-scope="scope"> @@ -419,7 +426,8 @@ sectionUpDia: false, sectionLoad: false, sectionRow: null, - sectionList: [] + sectionList: [], + templateList: [] } }, mounted() { @@ -436,6 +444,7 @@ this.selectEnumByCategoryForSpecial() this.selectEnumByCategoryForInspectionValueType() this.selectEnumByCategoryForSonLaboratory() + this.getStandardTemplate() }, methods: { filterNode(value, data) { @@ -810,6 +819,22 @@ // this.$message.success('宸蹭繚瀛�') }) }, + upStandardProductListOfTemplate(value, index) { + this.$axios.post(this.$api.standardTree.upStandardProductList, { + id: index, + templateId: value + }, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code == 201) { + this.$message.error('鏈繚瀛�') + return + } + // this.$message.success('宸蹭繚瀛�') + }) + }, delStandardMethodByFLSSM(id) { this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", @@ -1005,7 +1030,12 @@ this.$message.success('宸蹭繚瀛�') this.sectionUpDia = false }) - } + }, + getStandardTemplate() { + this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => { + this.templateList = res.data + }) + }, } } </script> diff --git a/src/components/view/notice-detail.vue b/src/components/view/notice-detail.vue index c4661e0..0c67cb0 100644 --- a/src/components/view/notice-detail.vue +++ b/src/components/view/notice-detail.vue @@ -16,8 +16,8 @@ </div> </div> <div class="info-box" v-if="noticeInfo.jumpPath"> - <!-- <component class="notice-content" :is="noticeInfo.jumpPath" style="height: 500px;" > - </component> --> + <component class="notice-content" :is="noticeInfo.jumpPath"> + </component> </div> </div> </template> @@ -68,9 +68,8 @@ <style scoped> .notice-detail-page{ - height: calc(100vh - 120px); - overflow-y: auto; - padding-top: 16px; + height: calc(100% - 30px); + padding: 16px 0; } .notice-detail-head{ background: #fff; @@ -83,8 +82,10 @@ width: 100%; box-sizing: border-box; padding: 8px 20px 20px; - background: rgba(148, 147, 147, 0.1); - border-radius: 8px; + background: rgba(0,0,0, 0.03); + box-shadow: 0 0 10px 10px #fff; + border-radius: 4px; + height: calc(100% - 192px - 22px); } .notice-detail-head-content div{ border-radius: 8px; @@ -95,4 +96,8 @@ box-sizing: border-box; margin-top: 12px; } + +.notice-content{ + height: 100%; +} </style> diff --git a/src/view/index.vue b/src/view/index.vue index 2d2d851..60b94d2 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -462,6 +462,7 @@ } this.getPower() this.timer&&clearInterval(this.timer); + this.checkForUnreadData() this.timer = setInterval(()=>{ this.checkForUnreadData() },30000) diff --git a/src/view/notice.vue b/src/view/notice.vue index 4aae834..4a10fef 100644 --- a/src/view/notice.vue +++ b/src/view/notice.vue @@ -54,14 +54,14 @@ </el-dropdown> <i class="el-icon-close" style="cursor: pointer;" @click="handleDel(m)"></i> </div> - <div class="content"> + <div class="content" @click="goNoticeDetail(m)" style="cursor: pointer;"> <img :src="`../../static/img/notice-${m.messageType}.svg`" alt="" style="width: 50px;margin-right: 18px;"> <div class="content-info"> <h4 style="font-weight: normal;margin-bottom: 4px;display: flex;align-items: center;justify-content: space-between;"> - <span>{{ m.theme }}<el-tag :type="!m.messageStatus?'danger':'success'" size="small" v-if="m.messageType==1||m.messageType==2||m.messageType==3" style="margin-left: 8px;">{{ !m.messageStatus?'鏈鐞�':'宸插鐞�' }}</el-tag></span> + <span>{{ m.theme }}<el-tag :type="!m.viewStatus?'danger':'success'" size="small" v-if="m.messageType==1||m.messageType==2||m.messageType==3" style="margin-left: 8px;">{{ !m.viewStatus?'鏈鐞�':'宸插鐞�' }}</el-tag></span> <span class="time" style="color: #999999;font-size: 12px;">{{ m.createTime }}</span> </h4> - <p style="color: #999999;font-size: 14px;margin-bottom: 6px;cursor: pointer;" class="ellipsis-multiline" @click="goNoticeDetail(m)">{{ m.content }}</p> + <p style="color: #999999;font-size: 14px;margin-bottom: 6px;" class="ellipsis-multiline">{{ m.content }}</p> <p style="font-size: 12px;color: #999999;display: flex;align-items: center;justify-content: space-between;"> <span>鍙戦�佷汉锛歿{m.createUser}}</span> <span>鏀朵欢浜猴細{{ m.consigneeUser }}</span> -- Gitblit v1.9.3