From 193bd433be6806ff917c24c63c109e79fd00a6da Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 25 三月 2024 16:02:49 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master --- src/components/view/b2-standard.vue | 12 +- src/components/do/b1-ins-order/add.vue | 4 src/components/do/b1-sample/detail.vue | 6 + src/components/tool/excel.vue | 127 ++++++++++++++++++------------- src/components/do/b1-inspect-order-plan/Inspection.vue | 14 ++- src/components/view/b2-standard-template.vue | 41 ++++++++-- src/components/view/b1-sample.vue | 2 7 files changed, 132 insertions(+), 74 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index b57f729..201c3e4 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -216,7 +216,7 @@ </div> --> <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;" > - <el-table-column type="selection" width="60" :selectable="selectable"></el-table-column> + <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column> <el-table-column type="index" label="搴忓彿" width="65" align="center"></el-table-column> <el-table-column prop="sample" label="鏍峰搧鍚嶇О" align="center" min-width="100"> <template slot-scope="scope"> @@ -295,7 +295,7 @@ <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> - <el-table-column type="selection" width="65" :selectable="selectable"></el-table-column> + <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" show-overflow-tooltip></el-table-column> diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 055e15c..6c4eb71 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -85,7 +85,7 @@ } </style> <template> - <div> + <div v-loading="loading"> <el-row class="title"> <el-col :span="12" style="padding-left: 20px;">妫�楠屽崟璇︽儏</el-col> <el-col :span="12" style="text-align: right;"> @@ -118,7 +118,7 @@ <el-input clearable v-model="insOrder.appointed" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" > - <span v-if="currentSample.index">{{ `NO.${currentSample.index}` }}</span> + <el-tag v-if="currentSample.index">{{ `NO.${currentSample.index}` }}</el-tag> </el-form-item> </el-form> </div> @@ -170,7 +170,7 @@ <el-drawer title="浠诲姟鍒囨崲" :visible.sync="taskVisible" - size="45%"> + :size="500"> <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" :componentData="componentData" :key="upIndex"/> @@ -199,7 +199,7 @@ sonLaboratory: null, userId: 0 }, - isIndex: true, + isIndex: false, showSelect: true, select: false, selectMethod:'handleChangeTask', @@ -226,6 +226,7 @@ urgentList:[], currentSample:{},//褰撳墠鏍峰搧淇℃伅 tableList:[], + loading: false } }, created() { @@ -238,6 +239,7 @@ }, watch:{ id(val){ + this.loading = true this.$axios.post(this.$api.insOrderPlan.doInsOrder,{ id: val }).then(res=>{ @@ -249,6 +251,8 @@ }) this.sampleProduct = res.data.sampleProduct this.currentSample = this.sampleProduct[0] + if(this.currentSample.index==undefined)this.currentSample['index'] = 1 + this.loading = false this.handleTableData() }) } @@ -260,7 +264,7 @@ this.sampleVisible = false; }, handleChangeTask(row){ - this.id = row[0].id; + if(row.length > 0)this.id = row[0].id; this.taskVisible = false; }, getTypeDicts() { diff --git a/src/components/do/b1-sample/detail.vue b/src/components/do/b1-sample/detail.vue index c4c1a06..69a72bb 100644 --- a/src/components/do/b1-sample/detail.vue +++ b/src/components/do/b1-sample/detail.vue @@ -1,5 +1,5 @@ <template> - <div style="width: 100%;height: 100%;overflow-y: auto;"> + <div style="width: 100%;height: 100%;overflow-y: auto;" class="detail"> <div> <el-row class="title"> <el-col :span="12" style="padding-left: 20px;">鏍峰搧璇︽儏</el-col> @@ -114,6 +114,10 @@ </script> <style scoped> + .detail::-webkit-scrollbar{ + width: 0; + } + .title { height: 60px; line-height: 60px; diff --git a/src/components/tool/excel.vue b/src/components/tool/excel.vue index 52a3a71..c410db2 100644 --- a/src/components/tool/excel.vue +++ b/src/components/tool/excel.vue @@ -10,7 +10,7 @@ } </style> <style> - #luckysheet .save{ + #luckysheet .save { width: 50px; height: 26px; color: #fff; @@ -20,11 +20,11 @@ cursor: pointer; } - #luckysheet .save:hover{ + #luckysheet .save:hover { opacity: .8; } - #luckysheet .save:active{ + #luckysheet .save:active { opacity: .7; } </style> @@ -33,12 +33,12 @@ </template> <script> -// import { data } from 'jquery'; +import { data } from 'jquery'; + // import { data } from 'jquery'; export default { - props: ['data','execlTitle'], + props: ['data', 'execlTitle'], data() { - return { - } + return {} }, mounted() { this.$nextTick(() => { @@ -47,52 +47,75 @@ }, methods: { templateWrite() { - if(this.data!=null&&this.data!=''){ - let option = JSON.parse(this.data) - option.title = this.execlTitle - luckysheet.create(option) - }else{ - console.log(this.execlTitle); - $(function() { - //閰嶇疆椤� - var options = { - container: 'luckysheet', - title: this.execlTitle, - lang: "zh", - showsheetbar: false, - showstatisticBarConfig: { - view: false - }, - data: [{ - name: '妯℃澘', - order: '0' - }], - enableAddRow: false, - row: 60, - column: 26, - enableAddBackTop: false, - showtoolbarConfig: { - chart: false, // '鍥捐〃' - pivotTable: false, //'鏁版嵁閫忚琛�' - protection:false, // '宸ヤ綔琛ㄤ繚鎶�' - }, - cellRightClickConfig: { - copyAs: false, // 澶嶅埗涓� - hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛� - hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒� - sort: false, // 鎺掑簭閫夊尯 - filter: false, // 绛涢�夐�夊尯 - chart: false, // 鍥捐〃鐢熸垚 - image: false, // 鎻掑叆鍥剧墖 - matrix: false, // 鐭╅樀鎿嶄綔閫夊尯 - }, - myFolderUrl: 'http://127.0.0.1/', - functionButton: '<button onClick="excelClosed()" class="save">淇濆瓨</button>' - } - options.title = this.execlTitle - luckysheet.create(options) - }) + var option = {} + if (this.data != null && this.data != '') { + option = JSON.parse(this.data) + } else { + let rowlen = {} + let columnlen = {} + for(let a = 0; a<60; a++){ + rowlen[''+a] = 40 + } + for(let a = 0; a<26; a++){ + columnlen[''+a] = 100 + } + option = { + data: [{ + name: '妯℃澘', + order: '0', + config: { + rowlen: rowlen, + columnlen: columnlen + } + }], + row: 60, + column: 26 + } } + option.title = this.execlTitle + option.container = 'luckysheet', + option.lang = "zh", + option.showsheetbar = false, + option.defaultFontSize = 14 + option.showstatisticBarConfig = { + view: false + }, + option.enableAddRow = false, + option.enableAddBackTop = false, + option.showtoolbarConfig = { + chart: false, // '鍥捐〃' + pivotTable: false, //'鏁版嵁閫忚琛�' + protection: false, // '宸ヤ綔琛ㄤ繚鎶�' + dataVerification: false, // '鏁版嵁楠岃瘉' + frozenMode: false, // '鍐荤粨鏂瑰紡' + currencyFormat: false, //璐у竵鏍煎紡 + percentageFormat: false, //鐧惧垎姣旀牸寮� + numberDecrease: false, // '鍑忓皯灏忔暟浣嶆暟' + numberIncrease: false, // '澧炲姞灏忔暟浣嶆暟 + moreFormats: false, // '鏇村鏍煎紡' + strikethrough: false, // '鍒犻櫎绾� (Alt+Shift+5)' + underline: false, // '涓嬪垝绾� (Alt+Shift+6)' + italic: false, // '鏂滀綋 (Ctrl+I)' + textWrapMode: false, // '鎹㈣鏂瑰紡' + textRotateMode: false, // '鏂囨湰鏃嬭浆鏂瑰紡' + conditionalFormat: false, // '鏉′欢鏍煎紡' + splitColumn: false, // '鍒嗗垪' + }, + option.cellRightClickConfig = { + copyAs: false, // 澶嶅埗涓� + hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛� + hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒� + sort: false, // 鎺掑簭閫夊尯 + filter: false, // 绛涢�夐�夊尯 + chart: false, // 鍥捐〃鐢熸垚 + image: false, // 鎻掑叆鍥剧墖 + matrix: false, // 鐭╅樀鎿嶄綔閫夊尯 + data: false, // 鏁版嵁楠岃瘉 + cellFormat: false // 璁剧疆鍗曞厓鏍兼牸寮� + }, + option.myFolderUrl = this.LOCATIONVUE + '/', + option.functionButton = '<button onClick="excelClosed()" class="save">淇濆瓨</button>' + luckysheet.create(option) } } } diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue index e05bf0f..934eef7 100644 --- a/src/components/view/b1-sample.vue +++ b/src/components/view/b1-sample.vue @@ -153,7 +153,7 @@ </style> <template> - <div class="inspection_order"> + <div class="sample"> <div style="width: 100%;height: 100%;" v-if="!isDetail"> <div> <el-row class="title"> diff --git a/src/components/view/b2-standard-template.vue b/src/components/view/b2-standard-template.vue index bf60cf6..da8c28e 100644 --- a/src/components/view/b2-standard-template.vue +++ b/src/components/view/b2-standard-template.vue @@ -59,7 +59,8 @@ </div> <div class="table"> <ValueTable ref="ValueTable" :url="$api.StandardTemplate.selectStandardTemplatePageList" - :upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" :componentData="componentData" :key="upIndex" /> + :upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" + :componentData="componentData" :key="upIndex" /> </div> <el-dialog title="妯℃澘缂栧埗" :visible.sync="isShow" width="80%" :before-close="isClose"> <div style="width: 100%;height: 80vh;overflow: auto;" v-if="isShow"> @@ -169,33 +170,57 @@ this.isShow = true this.row = row }, - closed(){ + closed() { this.loading = true let data = luckysheet.toJson() - this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{ + delete data.title + delete data.container + delete data.lang + delete data.showsheetbar + delete data.showstatisticBarConfig + delete data.enableAddRow + delete data.enableAddBackTop + delete data.showtoolbarConfig + delete data.cellRightClickConfig + delete data.myFolderUrl + delete data.functionButton + if(data.data[0].config.borderInfo != undefined){ + for (var i = 0; i < data.data[0].config.borderInfo.length; i++) { + let str = data.data[0].config.borderInfo + if (str[i].rangeType === 'range') { + if (str[i].borderType === 'border-none') { + data.data[0].config.borderInfo.splice(i, 1) + i -= 1 + } + } + } + } + this.$axios.post(this.$api.StandardTemplate.upStandardTemplate, { id: this.row.id, thing: JSON.stringify(data), name: luckysheet.getWorkbookName(['name']) - },{ + }, { headers: { 'Content-Type': 'application/json' } - }).then(res=>{ - if (res.code==201) return + }).then(res => { + if (res.code == 201) return this.loading = false this.$message.success('宸蹭繚瀛�') this.isShow = false this.refreshTable() }) }, - isClose(done){ + isClose(done) { this.$confirm('鏄惁闇�瑕佷繚瀛�?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { this.closed() - }).catch(()=>{done()}) + }).catch(() => { + done() + }) } } } diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 8d611f3..c88f576 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -155,9 +155,11 @@ </el-table> </el-row> <el-row class="product_table" v-loading="tableLoad2"> - <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe :fit="true" border - @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" @select="upProductSelect"> - <el-table-column type="selection" width="65"></el-table-column> + <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe + :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" + @select="upProductSelect"> + <el-table-column type="selection" width="65"> + </el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> <!-- <el-table-column prop="inspectionItemClassify" label="妫�楠岄」绫诲瀷" width="120" show-overflow-tooltip></el-table-column> --> <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" @@ -174,8 +176,8 @@ <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"> <template slot-scope="scope"> <el-input size="small" placeholder="瑕佹眰鎻忚堪" v-model="scope.row.tell" clearable - @change="(value)=>upStandardProductListOfTell(value,scope.row.id)" v-if="upStandardProduct" type="textarea" - :autosize="{ minRows: 1, maxRows: 3}"></el-input> + @change="(value)=>upStandardProductListOfTell(value,scope.row.id)" v-if="upStandardProduct" + type="textarea" :autosize="{ minRows: 1, maxRows: 3}"></el-input> <span v-else>{{scope.row.ask}}</span> </template> </el-table-column> -- Gitblit v1.9.3