From defa824eab2350fd6abfd10abd8f4df94749e336 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期三, 31 七月 2024 11:21:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/view/a6-device.vue | 170 ++++++++ src/components/do/b1-ins-order/add.vue | 79 ++- src/components/do/a6-device/state.vue | 13 src/components/do/a6-device/check.vue | 13 src/components/do/a6-device/fault.vue | 13 src/util/echarts.js | 69 +++ src/components/do/a6-device/maintenance.vue | 13 src/assets/api/controller.js | 2 src/components/tool/echart.vue | 3 src/components/do/a6-device/operation-overview.vue | 161 ++++++++ static/js/worker.js | 9 src/components/do/b1-sample/detail.vue | 11 static/js/worker0.js | 32 src/main.js | 2 src/components/do/a6-device/record.vue | 13 src/components/do/b1-inspect-order-plan/Inspection.vue | 197 +++++---- src/components/do/b3-work-time-management/work-time-management.vue | 2 src/components/do/a6-device/files.vue | 307 +++++++++++++++ src/components/do/a6-device/borrow.vue | 13 src/components/do/a6-device/check-and-accept.vue | 13 src/App.vue | 5 src/components/do/a6-device/calibration.vue | 13 22 files changed, 1,002 insertions(+), 151 deletions(-) diff --git a/src/App.vue b/src/App.vue index f010b6d..676b0b2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -318,4 +318,9 @@ font-size: 12px; line-height: 32px; } + .single-line-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } </style> diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js index 1c342d8..13eb73a 100644 --- a/src/assets/api/controller.js +++ b/src/assets/api/controller.js @@ -154,6 +154,8 @@ deleteDataAcquisitionConfiguration: "/deviceScope/deleteDataAcquisitionConfiguration", // 鍒犻櫎鏁伴噰閰嶇疆 determineWhetherToCollectData: "/deviceScope/determineWhetherToCollectData", // 鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ暟閲� dataCollection: "/deviceScope/dataCollection", // 鏁伴噰-鏁版嵁閲囬泦 + treeDevice: "/deviceScope/treeDevice", // 璁惧鏍戝舰 + temDataAcquisition: "/deviceScope/temDataAcquisition", // PK8000鏁伴噰 } const insOrder = { diff --git a/src/components/do/a6-device/borrow.vue b/src/components/do/a6-device/borrow.vue new file mode 100644 index 0000000..cfcc90b --- /dev/null +++ b/src/components/do/a6-device/borrow.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧鍊熺敤</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/calibration.vue b/src/components/do/a6-device/calibration.vue new file mode 100644 index 0000000..8e0ff62 --- /dev/null +++ b/src/components/do/a6-device/calibration.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧鏍″噯</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/check-and-accept.vue b/src/components/do/a6-device/check-and-accept.vue new file mode 100644 index 0000000..8882f55 --- /dev/null +++ b/src/components/do/a6-device/check-and-accept.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧楠屾敹</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/check.vue b/src/components/do/a6-device/check.vue new file mode 100644 index 0000000..8f3c0ed --- /dev/null +++ b/src/components/do/a6-device/check.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧鏍告煡</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/fault.vue b/src/components/do/a6-device/fault.vue new file mode 100644 index 0000000..41b9377 --- /dev/null +++ b/src/components/do/a6-device/fault.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧鏁呴殰</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/files.vue b/src/components/do/a6-device/files.vue new file mode 100644 index 0000000..bdb6021 --- /dev/null +++ b/src/components/do/a6-device/files.vue @@ -0,0 +1,307 @@ +<template> + <div class="page"> + <div class="page-header"> + <h4><span class="line"></span><span>璁惧妗f</span></h4> + <div class="btns"> + <el-button type="primary" size="small">淇妗f</el-button> + <el-button type="primary" size="small">娣诲姞闄勪欢</el-button> + </div> + </div> + <el-divider></el-divider> + <el-row :gutter="20"> + <el-col :span="6"> + <el-image src="" fit="fill" style="width: 200px;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 30px;margin-top: 20px;"> + <div slot="error" class="image-slot"> + <i class="el-icon-picture-outline" style="font-size: 40px;"></i> + </div> + </el-image> + </el-col> + <el-col :span="8"> + <div class="form-item"> + <label>璁惧鍚嶇О</label> + <p>{{ handleData('鎵弿鐢甸暅(甯﹁兘璋�)') }}</p> + </div> + <div class="form-item"> + <label>澶х被</label> + <p>{{ handleData('鍒嗘瀽浠櫒') }}</p> + </div> + <div class="form-item"> + <label>鍐呴儴缂栧彿</label> + <p>{{ handleData('鎵弿鐢甸暅(甯﹁兘璋�)') }}</p> + </div> + <div class="form-item"> + <label>鐢熶骇鍘傚</label> + <p>{{ handleData('鎵弿鐢甸暅(甯﹁兘璋�)') }}</p> + </div> + <div class="form-item"> + <label>璧勪骇缂栫爜</label> + <p>{{ handleData('鎵弿鐢甸暅(甯﹁兘璋�)') }}</p> + </div> + <div class="form-item"> + <label>鍑哄巶鏃ユ湡</label> + <p>{{ handleData('2024-7-20') }}</p> + </div> + <div class="form-item"> + <label>鍚敤鏃ユ湡</label> + <p>{{ handleData('2024-7-20') }}</p> + </div> + <div class="form-item"> + <label>鏍稿噯鍛ㄦ湡(鏈�)</label> + <p>{{ handleData('12') }}</p> + </div> + <div class="form-item"> + <label>妫�娴嬬被鍨�</label> + <p>{{ handleData('12') }}</p> + </div> + <div class="form-item"> + <label>鎶ュ簾鏃堕棿</label> + <p>{{ handleData('12') }}</p> + </div> + <div class="form-item"> + <label>鍑嗙‘搴﹂噺鍊�</label> + <p>{{ handleData('12') }}</p> + </div> + <div class="form-item"> + <label>琚巿鏉冧汉</label> + <p>{{ handleData('12') }}</p> + </div> + <div class="form-item"> + <label>缁翠慨璁板綍</label> + <p>{{ handleData('12') }}</p> + </div> + </el-col> + <el-col :span="10"> + <div class="form-item"> + <label>瑙勬牸鍨嬪彿</label> + <p>{{ handleData('JSM-6010LA') }}</p> + </div> + <div class="form-item"> + <label>缁嗙被</label> + <p>{{ handleData('鍒嗘瀽浠櫒') }}</p> + </div> + <div class="form-item"> + <label>璁惧鐘舵��</label> + <el-radio-group v-model="form.value1" disabled> + <el-radio :label="0" style="width: 40px;">鍚堟牸</el-radio> + <el-radio :label="1" style="width: 40px;">缁翠慨</el-radio> + <el-radio :label="2" style="width: 40px;">鍋滅敤</el-radio> + <el-radio :label="3" style="width: 40px;">鎶ュ簾</el-radio> + </el-radio-group> + </div> + <div class="form-item"> + <label>鍑哄巶缂栧彿</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>瀛樻斁鐐�</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>璐疆鏃ユ湡</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>浜у湴</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>鏈�杩戞函婧愭棩鏈�</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>閲囪喘璐圭敤(鍏�)</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>鍋滅敤鏃堕棿</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>璁惧璐熻矗浜�</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>楠屾敹璁板綍</label> + <p>{{ handleData() }}</p> + </div> + <div class="form-item"> + <label>鏍稿噯璇佷功</label> + <p>{{ handleData() }}</p> + </div> + </el-col> + </el-row> + <h4 style="margin-bottom: 10px;margin-top: 10px;"><span class="line"></span><span>闄勪欢鍜岀浉鍏虫枃妗�</span></h4> + <div class="tables"> + <ValueTable ref="ValueTable" + :url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay" + :delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex" style="min-height: 400px;"/> + </div> + </div> +</template> + +<script> +import ValueTable from '../../tool/value-table.vue' +export default { + components: { + ValueTable + }, + data(){ + return{ + componentData: { + entity: { + week: null, + weekDay: null, + dateTime: null, + name:null, + orderBy: { + field: 'id', + order: 'desc' + } + }, + isIndex: true, + showSelect: false, + select: false, + isPage:false, + do: [{ + id: 'getFile', + font: '闄勪欢', + type: 'text', + method: 'getFile' + }, { + id: 'handleLook', + font: '鏌ョ湅', + type: 'text', + method: 'handleLook' + },{ + id: 'delete', + font: '鍒犻櫎', + type: 'text', + method: 'doDiy', + disabFun: (row, index) => { + return row.state === '宸插鏍�' || row.state === '宸叉壒鍑�' + } + }], + tagField: { + shift:{ + select:[] + }, + state:{ + select:[ + { + label:'宸叉彁浜�', + value:'宸叉彁浜�', + type:'primary' + }, + { + label:'宸插鏍�', + value:'宸插鏍�', + type:'warning' + }, + { + label:'宸叉壒鍑�', + value:'宸叉壒鍑�', + type:'success' + }, + ] + }, + weekDay:{ + select:[] + } + }, + linkEvent: {}, + selectField: { + shift:{ + select:[] + }, + state:{ + select:[ + { + label:'宸叉彁浜�', + value:'宸叉彁浜�', + type:'primary' + }, + { + label:'宸插鏍�', + value:'宸插鏍�', + type:'warning' + }, + { + label:'宸叉壒鍑�', + value:'宸叉壒鍑�', + type:'success' + }, + ] + }, + weekDay:{ + select:[] + } + }, + requiredAdd: [], + requiredUp: [] + }, + upIndex:0, + form: { + value1:'' + } + } + }, + methods: { + handleData(m){ + if(m){ + return m + }else{ + return '-' + } + } + } +} +</script> + +<style scoped> +.page{ + width: 100%; + height: 100%; + overflow-y: auto; + overflow-x: hidden; +} +.page-header{ + display: flex; + justify-content: space-between; +} +h4{ + display: flex; + align-items: center; +} +h4 .line{ + display: inline-block; + width: 3px; + height: 16px; + background: #3A7BFA; + margin-right: 4px; +} +.tables{ + width: calc(100vw - 390px); +} +.el-image { + position: relative; +} +.el-icon-picture-outline{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); +} +.form-item{ + line-height: 34px; + display: flex; + align-items: center; + font-size: 14px; +} +.form-item label{ + width: 110px; + display: inline-block; + text-align: right; + margin-right: 20px; + color: #999; +} +</style> diff --git a/src/components/do/a6-device/maintenance.vue b/src/components/do/a6-device/maintenance.vue new file mode 100644 index 0000000..8a8a962 --- /dev/null +++ b/src/components/do/a6-device/maintenance.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧缁存姢</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/operation-overview.vue b/src/components/do/a6-device/operation-overview.vue new file mode 100644 index 0000000..a1084da --- /dev/null +++ b/src/components/do/a6-device/operation-overview.vue @@ -0,0 +1,161 @@ +<template> + <div class="page"> + <echart-module :id="'page-left'" :config="chartConfig" :datas="chartData" class="page-left"></echart-module> + <div class="page-right"> + <div class="form-item"> + <label>鏁呴殰娆℃暟</label> + <span>0</span> + </div> + <div class="form-item"> + <label>鏈�杩戞晠闅滄棩鏈�</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>鏈�杩戞牎鍑嗘棩鏈�</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>涓嬫鏍″噯鏃ユ湡</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>鏍″噯鎬荤粨璁�</label> + <el-radio-group v-model="form.value1" disabled> + <el-radio :label="0">鍚堟牸</el-radio> + <el-radio :label="1">涓嶅悎鏍�</el-radio> + <el-radio :label="2">鍏朵粬</el-radio> + </el-radio-group> + </div> + <div class="form-item"> + <label>鏈�杩戞牳鏌ユ棩鏈�</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>涓嬫鏍告煡鏃ユ湡</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>鏍告煡鎬荤粨璁�</label> + <el-radio-group v-model="form.value1" disabled> + <el-radio :label="0">鍚堟牸</el-radio> + <el-radio :label="1">涓嶅悎鏍�</el-radio> + <el-radio :label="2">鍏朵粬</el-radio> + </el-radio-group> + </div> + <div class="form-item"> + <label>鏈�杩戠淮鎶ゆ棩鏈�</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>涓嬫缁存姢鏃ユ湡</label> + <el-date-picker + v-model="form.value1" + type="date" + size="small" + placeholder="閫夋嫨鏃ユ湡" style="width: calc(100% - 200px);" readonly> + </el-date-picker> + </div> + <div class="form-item"> + <label>缁存姢绫诲瀷</label> + <el-radio-group v-model="form.value1" disabled> + <el-radio :label="0">浣跨敤鍓嶅悗缁存姢</el-radio> + <el-radio :label="1">璁″垝涓淮鎶�</el-radio> + </el-radio-group> + </div> + <div class="form-item"> + <label>娴嬮噺椤圭洰</label> + <span>1111111</span> + </div> + </div> + </div> +</template> + +<script> +import EchartModule from '../../tool/echart.vue' +export default { + components: {EchartModule}, + data(){ + return { + chartConfig:{ + height: '', + isLoading:true, + type:'gauge' + }, + chartData:{ + xData:[], + yData:[ + { + title:'浠诲姟鎺ユ敹閲�', + data:[] + } + ] + }, + form:{ + value1:'' + } + } + } +} +</script> + +<style scoped> +.page{ + width: 100%; + height: 100%; + display: flex; +} +.page-left{ + width: 420px; + height: 420px; + margin-top: 40px; + margin-right: 40px; +} +.page-right{ + flex: 1; + /* background: red; */ +} +.form-item{ + line-height: 42px; + font-size: 14px; +} +.page-right label{ + color: #999; + width: 110px; + display: inline-block; + text-align: right; + margin-right: 20px; +} +>>>.el-radio__input.is-disabled+span.el-radio__label{ + color: #606266 !important; +} +</style> diff --git a/src/components/do/a6-device/record.vue b/src/components/do/a6-device/record.vue new file mode 100644 index 0000000..0d26a3d --- /dev/null +++ b/src/components/do/a6-device/record.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧璁板綍</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/a6-device/state.vue b/src/components/do/a6-device/state.vue new file mode 100644 index 0000000..fa4c76c --- /dev/null +++ b/src/components/do/a6-device/state.vue @@ -0,0 +1,13 @@ +<template> + <div>璁惧鍋滅敤/鍚敤</div> +</template> + +<script> +export default { + +} +</script> + +<style scoped> + +</style> diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 6d38eb9..6ca49cf 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -74,18 +74,18 @@ display: flex; flex-direction: row; justify-content: space-between; - .opticalProject { - width: 38%; - } - .temperatureList { - width: 60%; - .temperatureListTitle { - display: flex; - flex-direction: row; - justify-content: space-between; - line-height: 30px; - } - } + } + .opticalProject { + width: 38%; + } + .temperatureList { + width: 60%; + } + .temperatureListTitle { + display: flex; + flex-direction: row; + justify-content: space-between; + line-height: 30px; } </style> <style> @@ -118,7 +118,7 @@ } .ins_order_add .el-table .warning-row .cell { - color: #bababa; + color: #3A7BFA; } .ins_order_add .el-select .is-disabled { @@ -481,10 +481,10 @@ <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="100" show-overflow-tooltip></el-table-column> --> <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> --> <el-table-column prop="section" label="鍖洪棿" min-width="120" show-overflow-tooltip></el-table-column> - <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"> + <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px" v-if="isAskOnlyRead"> <template slot-scope="scope"> <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea" - :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" + :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'ask')" v-if="active==1&&isAskOnlyRead"></el-input> <span v-else> <!-- <template v-if="(scope.row.ask.indexOf('D')>-1 @@ -497,6 +497,16 @@ </template> <template v-else>{{ scope.row.ask }}</template> --> <template >{{ scope.row.ask }}</template> + </span> + </template> + </el-table-column> + <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"> + <template slot-scope="scope"> + <el-input size="small" placeholder="瑕佹眰鎻忚堪" v-model="scope.row.tell" clearable type="textarea" + :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')" + v-if="active==1&&isAskOnlyRead"></el-input> + <span v-else> + <template >{{ scope.row.tell }}</template> </span> </template> </el-table-column> @@ -611,20 +621,20 @@ <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" /> <cableConfig v-if="cableConfigShow" :active="active" /> <!-- 鍗曢�夌壒娈婂�煎鐞嗘--> - <el-dialog title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨" :visible.sync="bsm1Dia" width="500px" :show-close="false" + <el-dialog title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨" :visible.sync="bsm1Dia" min-width="400px" :show-close="false" :before-close="beforeClose"> <div class="body" style="max-height: 60vh;"> <el-row v-if="bsm1"> - <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;"> - <div class="search_label"><span class="required-span">* </span>閫夐」锛�</div> + <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;"> + <div class="search_label" style="width: 80px;"><span class="required-span">* </span>閫夐」锛�</div> <div class="search_input"> <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" style="margin-bottom: 2px;margin-top: 2px;"></el-radio> </el-radio-group> </div> </el-col> - <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;"> - <div class="search_label">瑕佹眰鍊硷細</div> + <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;"> + <div class="search_label" style="width: 80px;">瑕佹眰鍊硷細</div> <div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''"> <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" @@ -673,20 +683,20 @@ </div> </el-dialog> <!-- 鍏ㄩ�夌壒娈婂�煎鐞嗘--> - <el-dialog title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨" :visible.sync="bsm1DiaAll" width="500px" :show-close="false" + <el-dialog title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨" :visible.sync="bsm1DiaAll" min-width="400px" :show-close="false" :before-close="beforeClose"> <div class="body" style="max-height: 60vh;" v-for="(item, index) in bsm1DiaList" :key="index"> <el-row v-if="item.bsm1"> - <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;"> - <div class="search_label"><span class="required-span">* </span>閫夐」锛�</div> + <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;"> + <div class="search_label" style="width: 80px;"><span class="required-span">* </span>閫夐」锛�</div> <div class="search_input"> <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" :label="a" style="margin-bottom: 2px;margin-top: 2px;"></el-radio> </el-radio-group> </div> </el-col> - <el-col class="search_thing" :span="22" style="height: initial;margin: 5px 0;"> - <div class="search_label">瑕佹眰鍊硷細</div> + <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;"> + <div class="search_label" style="width: 80px;">瑕佹眰鍊硷細</div> <div class="search_input" v-show="item.bsm1Val!==null&&item.bsm1Val!==''"> <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" @@ -1107,7 +1117,7 @@ this.selectEnumByCategoryForType() this.getUserNow() this.selectStandardTreeList() - this.selectInsOrderTemplate() + // this.selectInsOrderTemplate() this.getAuthorizedPerson(); this.selectEnumByCategoryForUnit() this.selectStandardMethods() @@ -1403,6 +1413,10 @@ this.addObj.code = selects.code this.addObj.companyId = selects.id this.selectUserDia = false + if(this.active==1){ + // TODO + this.selectInsOrderTemplate() + } }, containsValue(str) { if(str){ @@ -1863,6 +1877,9 @@ this.addObj.companyId = selects.departId this.addObj.production = '/' this.addObj.productionEn = '/' + if(this.active==1){ + this.selectInsOrderTemplate() + } }) }, getProNum() { @@ -2150,12 +2167,12 @@ rowIndex }) { if (row.state === 0) { - return 'warning-row'; + return ''; } - return ''; + return 'warning-row'; }, selectInsOrderTemplate() { - this.$axios.get(this.$api.insOrder.selectInsOrderTemplate).then(res => { + this.$axios.get(this.$api.insOrder.selectInsOrderTemplate+'?company='+this.addObj.company).then(res => { if (res.code == 201) return this.templates = res.data }) @@ -2327,12 +2344,12 @@ } }, // 瑕佹眰鍊煎彉鍖栨椂 - requestChange(e, row) { + requestChange(e, row,type) { this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { if (m.id == row.id) { - m.ask = e; + m[type] = e; } return m; }) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index f356f86..0d4f449 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -317,8 +317,8 @@ <span style="margin-left: 4px;">%</span> </el-form-item> </el-form> - <el-button type="primary" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='妫�娴嬩腑蹇�'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">鏁版嵁閲囬泦</el-button> - <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='妫�娴嬩腑蹇�'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button> + <el-button type="primary" size="small" v-if="(dataAcquisitionEidt>0||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'&&temDataAcquisition)&&PROJECT=='妫�娴嬩腑蹇�'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">鏁版嵁閲囬泦</el-button> + <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(dataAcquisitionEidt>0)&&PROJECT=='妫�娴嬩腑蹇�'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button> </div> </div> <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐑惊鐜�')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('娓╁崌璇曢獙'))"> @@ -504,20 +504,20 @@ <el-table-column label="搴忓彿" type="index" - width="60" + width="59" align="center" > </el-table-column> <el-table-column prop="bushColor" label="绠¤壊鏍�" - width="80" + width="75" align="center"> </el-table-column> <el-table-column prop="code" label="鍏夌氦甯︾紪鍙�" - width="110" + width="105" align="center"> </el-table-column> <el-table-column @@ -531,7 +531,7 @@ prop="value0" label="澶栫" align="center" - width="80" :key="(new Date())+'1'"> + width="100" :key="(new Date().getTime())+'1234567'"> <template slot="header"> {{ '澶栫'+(index+1) }} </template> @@ -543,7 +543,7 @@ prop="value1" label="鍐呯" align="center" - width="80" :key="(new Date())+'2'"> + width="100" :key="(new Date().getTime())+'23333333'"> <template slot="header"> {{ '鍐呯'+(index+1) }} </template> @@ -554,7 +554,7 @@ <el-table-column prop="comValue" align="center" - min-width="150" :key="(new Date())+'3'"> + min-width="150" :key="(new Date().getTime())+'364654654'"> <template slot="header"> {{ '琛板噺绯绘暟'+item }} </template> @@ -567,7 +567,7 @@ label="琛板噺宸�" align="center" v-if="wareForm.inspectionItemSubclass!='20(甯告俯)'" - min-width="90" :key="(new Date())+'4'"> + min-width="90" :key="(new Date().getTime())+'434634634634'"> <template slot="header"> {{ '琛板噺宸�'+(index+1) }} </template> @@ -579,7 +579,7 @@ prop="insResult" label="缁撹" align="center" - min-width="70" v-if="wareForm.inspectionItemSubclass!='20(甯告俯)'" :key="(new Date())+'5'"> + min-width="70" v-if="wareForm.inspectionItemSubclass!='20(甯告俯)'" :key="(new Date().getTime())+'53457689809808-'"> <template slot="header"> {{ '缁撹'+(index+1) }} </template> @@ -959,6 +959,7 @@ inspectionItemClass:null, }, thermalCyclingLoading:false, + temDataAcquisition:false, } }, computed: { @@ -1121,80 +1122,63 @@ methods: { // 鏁版嵁閲囬泦 getDataAcquisitionDevice(){ - this.dataAcquisitionLoading = true - this.$axios.get(this.$api.deviceScope.dataCollection+'?entrustCode='+this.insOrder.entrustCode+'&sampleCode='+this.currentSample.sampleCode + '&id=' + this.currentSample.id).then(res=>{ - this.dataAcquisitionLoading = false - if(res.code!=200){ - return + if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'){ + // 娓╁害寰幆妫�楠屽師濮嬭褰�----鏁伴噰----PK8000 + let temperature = this.wareForm.inspectionItemSubclass; + if(typeof temperature == 'string'&&temperature.includes('(甯告俯)')){ + temperature = `20鈩�(甯告俯)` + }else{ + temperature = temperature + '鈩�' } - this.dataAcquisitionInfo = res.data - try { - // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫 - this.worker0.postMessage(JSON.stringify({ - dataAcquisitionInfo: this.dataAcquisitionInfo, - list:this.tableList[0].arr - })); - } catch (error) { - console.log(1111,error); - } - // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋� - this.worker0.onmessage = (event) => { - let result = JSON.parse(event.data); - if(result.method=='changeInput'){ - let {list,n} = result.value - this.$set(this.tableList[0],'arr',list) - this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) + this.dataAcquisitionLoading = true + this.$axios.post(this.$api.deviceScope.temDataAcquisition,{ + entrustCode:this.insOrder.entrustCode, + sampleCode:this.currentSample.sampleCode, + model:this.wareForm0.model, + cycles:this.wareForm.inspectionItem, + temperature:temperature, + }, { + headers: { + 'Content-Type': 'application/json' + }, + noQs:true + }).then(res=>{ + this.dataAcquisitionLoading = false + if(res.code!=200){ + return } - }; - // let list = this.tableList[0].arr - // list.forEach((item,index)=>{ - // let num = 0; - // let str = '' - // item.forEach(m=>{ - // if(m.v.ps&&(m.v.ps.value=='妫�楠屽瓙椤�'||m.v.ps.value=='妫�楠岄」')){ - // if(m.v.ps&&m.v.ps.value=='妫�楠岄」'){ - // if(num==0){ - // str = m.v.v+',' - // num++ - // } - // } - // if(m.v.ps&&m.v.ps.value=='妫�楠屽瓙椤�'){ - // if(num==1){ - // str = str+m.v.v - // } - // } - // if(this.dataAcquisitionInfo[str]){ - // let num = 0; - // list[index].forEach(n=>{ - // if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('妫�楠屽��')){ - // num++ - // } - // }) - // list[index].forEach((n,i)=>{ - // if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('妫�楠屽��')){ - // let arr = n.v.ps.value.split('鍊�') - // if(arr[1] ==this.dataAcquisitionInfo.frequency){ - // setTimeout(()=>{ - // this.$delete(n.v,'v') - // this.$set(n.v,'v',this.dataAcquisitionInfo[str]) - // this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) - // },1000) - // }else if(Number(this.dataAcquisitionInfo.frequency)>num){ - // if(n.v.ps.value.includes(num)){ - // setTimeout(()=>{ - // this.$delete(n.v,'v') - // this.$set(n.v,'v',this.dataAcquisitionInfo[str]) - // this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) - // },1000) - // } - // } - // } - // }) - // } - // } - // }) - // }) - }) + // console.log(res.data) + this.wareFormChange() + }) + }else{ + // 涓�鑸殑鏁版嵁閲囬泦 + this.dataAcquisitionLoading = true + this.$axios.get(this.$api.deviceScope.dataCollection+'?entrustCode='+this.insOrder.entrustCode+'&sampleCode='+this.currentSample.sampleCode + '&id=' + this.currentSample.id).then(res=>{ + this.dataAcquisitionLoading = false + if(res.code!=200){ + return + } + this.dataAcquisitionInfo = res.data + try { + // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫 + this.worker0.postMessage(JSON.stringify({ + dataAcquisitionInfo: this.dataAcquisitionInfo, + list:this.tableList[0].arr + })); + } catch (error) { + console.log(1111,error); + } + // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋� + this.worker0.onmessage = (event) => { + let result = JSON.parse(event.data); + if(result.method=='changeInput'){ + let {list,n} = result.value + this.$set(this.tableList[0],'arr',list) + this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) + } + }; + }) + } }, // 澶氱嚎绋� startWorker() { @@ -1221,7 +1205,11 @@ }, // 娓╁害寰幆---寮�濮� changeItem(row){ - if(row.value0&&row.value1){ + if(row.value0&&!row.value1){ + this.$set(row,'comValue',Number(row.value0).toFixed(3)) + }else if(!row.value0&&row.value1){ + this.$set(row,'comValue',Number(row.value1).toFixed(3)) + }else if(row.value0&&row.value1){ this.$set(row,'comValue',((Number(row.value0)+Number(row.value1))/2).toFixed(3)) }else{ return @@ -1391,8 +1379,10 @@ let arr1 = [] this.wareLength = []; for(let i=0;i<arr.length;i++){ - arr1.push([]) this.wareLength.push(arr[i][0].inspectionItemClass) + } + for(let i=0;i<arr[0].length;i++){ + arr1.push([]) } arr.forEach((item,index)=>{ item.forEach((m,i)=>{ @@ -1703,6 +1693,7 @@ let fileDel = false let fileAdd = false let collected = false + let temDataAcquisition = false for (var i = 0; i < power.length; i++) { if (power[i].menuMethod == 'uploadFile') { fileAdd = true @@ -1713,12 +1704,16 @@ if (power[i].menuMethod == 'isItAllowedToModifyTheCollectedValues') { collected = true } + if (power[i].menuMethod == 'temDataAcquisition') { + temDataAcquisition = true + } } if (!fileDel) { this.componentData0.do.splice(1, 1) } this.fileAdd = fileAdd this.collected = collected + this.temDataAcquisition = temDataAcquisition }, async getCurrentProduct(id,type){ this.tableLoading = true; @@ -2186,8 +2181,7 @@ conclusionList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '缁撹') finalList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '鏈�缁堝��') a.template.forEach( b => { - if (b.v.ps != undefined && b.v.ps.value === '搴忓彿' && (b.v.mc == undefined || Object.keys(b.v.mc) - .length === 4)) { + if (b.v.ps != undefined && b.v.ps.value === '搴忓彿' && (b.v.mc == undefined || Object.keys(b.v.mc).length === 4)) { count1++ b.v.v = count1 } @@ -2195,12 +2189,14 @@ b.v.v = this.getAsk(b.i) } if (b.v.ps != undefined && typeof b.v.ps.value ==='string'&&b.v.ps.value.includes('妫�楠屽��')) { - b.v.v = '' + this.$set(b.v, 'v','' ) + // b.v.v = '' b.u = '' b.i && this.param[b.i].insValue.push(b) } if (b.v.ps != undefined && b.v.ps.value === '璁$畻鍊�') { - b.v.v = '' + this.$set(b.v, 'v','' ) + // b.v.v = '' b.i && this.param[b.i].comValue.push(b) } if (b.v.ps != undefined && b.v.ps.value === '璁惧缂栫爜') { @@ -2570,11 +2566,16 @@ return sum }, handleInput (n) { - n.v.v = n.v.v.replace(/[^\d.^e\-/+]/g, ''); - n.v.v = n.v.v.replace(/\.{2,}/g,"."); //鍙繚鐣欑涓�涓�. 娓呴櫎澶氫綑鐨� - n.v.v = n.v.v.replace(".","$#$").replace(/\./g,"").replace("$#$","."); - n.v.v = n.v.v.replace(/\/{2,}/g,"/"); //鍙繚鐣欑涓�涓�/娓呴櫎澶氫綑鐨� - n.v.v = n.v.v.replace("/","$#$").replace(/\//g,"").replace("$#$","/"); + try { + n.v.v = n.v.v.replace(/[^\d.^e\-/+]/g, ''); + n.v.v = n.v.v.replace(/\.{2,}/g,"."); //鍙繚鐣欑涓�涓�. 娓呴櫎澶氫綑鐨� + n.v.v = n.v.v.replace(".","$#$").replace(/\./g,"").replace("$#$","."); + n.v.v = n.v.v.replace(/\/{2,}/g,"/"); //鍙繚鐣欑涓�涓�/娓呴櫎澶氫綑鐨� + n.v.v = n.v.v.replace("/","$#$").replace(/\//g,"").replace("$#$","/"); + } catch (error) { + console.log(error); + } + }, getInspectionItemType(id) { for (var a in this.currentSample.insProduct) { @@ -2708,6 +2709,14 @@ this.$message.error("璇锋寚瀹氬鏍镐汉鍛�") return } + if(!this.otherForm.humidity){ + this.$message.error("璇疯緭鍏ユ箍搴�") + return + } + if(!this.otherForm.temperature){ + this.$message.error("璇疯緭鍏ユ俯搴�") + return + } this.addVerifyDia = false this.submitLoading = true; this.$axios.post(this.$api.insOrderPlan.checkSubmitPlan, { @@ -2801,7 +2810,9 @@ 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.$delete(this.param[n.i].equipValue[i1].v,'v') this.$set(this.param[n.i].equipValue[i1].v,'v',val) + this.$delete(this.param[n.i].equipName[i1].v,'v') this.$set(this.param[n.i].equipName[i1].v,'v',this.equipOptions[i].label) this.param[n.i].equipValue[i1].isItADataAcquisitionDevice = this.equipOptions[i].isItADataAcquisitionDevice } diff --git a/src/components/do/b1-sample/detail.vue b/src/components/do/b1-sample/detail.vue index 938461d..f76f413 100644 --- a/src/components/do/b1-sample/detail.vue +++ b/src/components/do/b1-sample/detail.vue @@ -66,12 +66,12 @@ </el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="100" show-overflow-tooltip></el-table-column> - <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」鍒嗙被" min-width="100" show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」鍒嗙被" min-width="100" show-overflow-tooltip v-if="PROJECT=='瑁呭鐢电紗'"></el-table-column> <el-table-column prop="laboratory" label="瀹為獙瀹�" min-min-width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="unit" label="鍗曚綅" min-width="100" show-overflow-tooltip></el-table-column> - <el-table-column prop="equipName" label="璁惧" min-width="100" show-overflow-tooltip> + <el-table-column prop="equipValue" label="璁惧" min-width="100" show-overflow-tooltip> <template slot-scope="scope"> - {{handleData(scope.row.equipName)}} + {{handleData(scope.row.equipValue)}} </template> </el-table-column> <el-table-column prop="entrustCode" label="濮旀墭缂栧彿" min-width="100" show-overflow-tooltip></el-table-column> @@ -135,9 +135,12 @@ }) }, handleData(e){ - let info = JSON.parse(e).map(item => { + let info = '' + if(e){ + info = JSON.parse(e).map(item => { return item.v; }).join(',') + } return info } } diff --git a/src/components/do/b3-work-time-management/work-time-management.vue b/src/components/do/b3-work-time-management/work-time-management.vue index d38f8a2..6211dad 100644 --- a/src/components/do/b3-work-time-management/work-time-management.vue +++ b/src/components/do/b3-work-time-management/work-time-management.vue @@ -679,11 +679,13 @@ this.title = '瀹℃牳' this.formData0 = row; this.checkVisible = true + this.formData0.reviewerNumber = this.formData0.amount }, handleRatify(row){ this.title = '鎵瑰噯' this.formData0 = row; this.checkVisible = true + this.formData0.reviewerNumber = this.formData0.amount }, handleChangeTask (row) { this.ValueTable0Selected = JSON.parse(JSON.stringify(row)) diff --git a/src/components/tool/echart.vue b/src/components/tool/echart.vue index a9bbaf8..d0f7674 100644 --- a/src/components/tool/echart.vue +++ b/src/components/tool/echart.vue @@ -79,6 +79,9 @@ case 'pie': iuCharts.drawPie(this.chart,this.datas) break; + case 'gauge': + iuCharts.drawGauge(this.chart,this.datas) + break; default: break; } diff --git a/src/components/view/a6-device.vue b/src/components/view/a6-device.vue index 1b660a4..b904515 100644 --- a/src/components/view/a6-device.vue +++ b/src/components/view/a6-device.vue @@ -1,19 +1,161 @@ <template> <div class="device-page"> <div class="device-left"> - <el-input placeholder="杈撳叆璁惧鍚嶇О" suffix-icon="el-icon-search" v-model="search" size="small" - style="margin-bottom: 5px;" clearable></el-input> + <el-input placeholder="杈撳叆璁惧鍚嶇О" suffix-icon="el-icon-search" v-model="deviceName" size="small" + @keyup.enter="geList" + style="margin-bottom: 5px;" clearable @change="geList"></el-input> + <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="id" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" + @node-collapse="nodeClose" v-loading="loading" :expand-on-click-node="false" + :default-expanded-keys="expandedKeys" + style="height:calc(100% - 46px);overflow-y: scroll;scrollbar-width: none;"> + <div class="custom-tree-node" slot-scope="{ node, data }"> + <el-row style="width: 100%;"> + <el-col :span="21" :title="data.label"> + <span class="single-line-ellipsis" style="width: 100%;display: inline-block;"> + <i :class="`node_i ${data.children != undefined ? (data.code==='[1]'?'el-icon-folder-opened':'el-icon-folder') : 'el-icon-tickets'}`"></i> + {{ data.label }} + </span> + </el-col> + </el-row> + </div> + </el-tree> </div> - <div class="device-right"></div> + <div class="device-right"> + <el-radio-group v-model="currentPage" size="small"> + <el-radio-button :label="item.id" v-for="(item,index) in tabList" :key="index" + size="small">{{ item.title }}</el-radio-button> + </el-radio-group> + <div class="device-right-content"> + <component :is="currentPage"></component> + </div> + </div> </div> </template> <script> +import operationOverview from '../do/a6-device/operation-overview.vue'; +import files from '../do/a6-device/files.vue'; +import checkAndAccept from '../do/a6-device/check-and-accept.vue'; +import calibration from '../do/a6-device/calibration.vue'; +import check from '../do/a6-device/check.vue'; +import maintenance from '../do/a6-device/maintenance.vue'; +import borrow from "../do/a6-device/borrow.vue"; +import fault from "../do/a6-device/fault.vue"; +import record from '../do/a6-device/record.vue'; +import state from '../do/a6-device/state.vue'; export default { + components:{ + operationOverview, + files, + checkAndAccept, + calibration, + check, + maintenance, + borrow, + fault, + record, + state, + }, data(){ return { - search:'' + deviceName:'', + loading:false, + tabList:[ + { + id:'operationOverview', + title:'璁惧杩愯鎬昏', + }, + { + id:'files', + title:'璁惧妗f', + }, + { + id:'checkAndAccept', + title:'璁惧楠屾敹', + }, + { + id:'calibration', + title:'璁惧鏍″噯', + }, + { + id:'check', + title:'璁惧鏍告煡', + }, + { + id:'maintenance', + title:'璁惧缁存姢', + }, + { + id:'borrow', + title:'璁惧鍊熺敤', + }, + { + id:'fault', + title:'璁惧鏁呴殰', + }, + { + id:'record', + title:'浣跨敤璁板綍', + }, + { + id:'state', + title:'璁惧鍋滅敤/鍚敤', + }, + ], + currentPage:'operationOverview', + expandedKeys:[], + selectTree:'', + list:[] } + }, + mounted(){ + this.geList() + }, + methods:{ + geList(){ + this.loading = true; + this.$axios.get(this.$api.deviceScope.treeDevice+'?deviceName='+this.deviceName).then(res => { + this.loading = false; + let data = res.data + data.forEach((item,index) => { + item.id = index +1 + item.label = item.largeCategory + item.children.forEach((m,i)=>{ + m.label = m.deviceName + }) + }) + this.list = data + }) + }, + handleNodeClick(val, node, el) { //鏍戠殑鍊� + this.selectTree = '' + this.getNodeParent(node) + this.selectTree = this.selectTree.replace(' - ', '') + let data = this.selectTree.split(' - ') + let data2 = '' + for (let index = data.length - 1; index >= 0; index--) { + data2 += " - " + data[index] + } + this.selectTree = data2.replace(' - ', '') + + this.currentPage = 'operationOverview'; + }, + getNodeParent(val) { + if (val.parent != null) { + if(val.data.children === null){ + this.selectTree += ' - ' + val.label + ' - ' + 'null' + }else{ + this.selectTree += ' - ' + val.label + } + this.getNodeParent(val.parent) + } + }, + nodeOpen(data, node, el) { + $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') + }, + nodeClose(data, node, el) { + $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') + }, } } </script> @@ -24,6 +166,7 @@ padding-top: 10px; padding-bottom: 10px; box-sizing: border-box; + width: 100%; } .device-left{ width: 200px; @@ -31,10 +174,29 @@ background: #fff; margin-right: 10px; border-radius: 16px; + box-sizing: border-box; + padding: 10px 16px; } .device-right{ background: #fff; flex: 1; border-radius: 16px; + box-sizing: border-box; + padding: 10px 16px; +} +.device-right-content{ + margin-top: 10px; + height: calc(100% - 42px); + width: 100%; +} +.custom-tree-node { + width: 100%; + /* line-height: 32px; */ + font-size: 14px; +} + +.node_i { + color: orange; + font-size: 18px; } </style> diff --git a/src/main.js b/src/main.js index 01126d7..2ac230c 100644 --- a/src/main.js +++ b/src/main.js @@ -20,7 +20,7 @@ //鏈湴 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; // const javaApi = 'http://127.0.0.1:8001'; -const javaApi = 'http://192.168.92.249:8001'; +const javaApi = 'http://192.168.92.2:8001'; //浜� // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; diff --git a/src/util/echarts.js b/src/util/echarts.js index eec1f8c..156ead4 100644 --- a/src/util/echarts.js +++ b/src/util/echarts.js @@ -265,6 +265,75 @@ ] }; chart.setOption(option); + }, + drawGauge:function(chart,params){ + let option = { + tooltip: { + formatter: "{a} <br/>{b} : {c}%" + }, + toolbox: { + feature: { + restore: {}, + saveAsImage: {} + } + }, + series: [ + { + type: 'gauge', + axisLine: { + lineStyle: { + width: 28, + color: [ + [0.3, '#67e0e3'], + [0.7, '#37a2da'], + [1, '#fd666d'] + ] + } + }, + pointer: { + itemStyle: { + color: 'auto' + } + }, + axisTick: { + distance: -28, + length: 8, + lineStyle: { + color: '#fff', + width: 2 + } + }, + splitLine: { + distance: -28, + length: 28, + lineStyle: { + color: '#fff', + width: 4 + } + }, + axisLabel: { + color: 'inherit', + distance: 40, + fontSize: 14 + }, + detail: { + valueAnimation: true, + formatter: '{value} %', + color: 'inherit', + textStyle: { + fontSize: 30, + align: 'center', + }, + }, + data: [ + { + value: 70 + } + ] + } + ] + }; + chart.setOption(option,true); } } diff --git a/static/js/worker.js b/static/js/worker.js index e6e931f..28c9c74 100644 --- a/static/js/worker.js +++ b/static/js/worker.js @@ -339,8 +339,13 @@ try{ if(comResult==0){ a[b].v.v = 0 + }else if(a[b].v.ct&&a[b].v.ct.fa&&typeof a[b].v.ct.fa == 'string'&&a[b].v.ct.fa.includes('.')){ + let num = 0 + let str = n.v.ct.fa.split('.')[1] + num = str.length + a[b].v.v = comResult?Number(comResult).toFixed(num):0 }else{ - let val = parseFloat(comResult.toFixed(3)) + let val = parseFloat(Number(comResult).toFixed(3)) a[b].v.v = isNaN(val) ? '' : val } }catch(error){ @@ -857,7 +862,7 @@ } else if (isPoint) { return str.replace('ABS', '').replace(/\(|\)/g, '') }else { - // console.log('str', str,eval(str)) + // console.log('str', str) return eval(str) } } catch (error) { diff --git a/static/js/worker0.js b/static/js/worker0.js index aa80ca3..e2481ba 100644 --- a/static/js/worker0.js +++ b/static/js/worker0.js @@ -42,7 +42,14 @@ let arr = n.v.ps.value.split('鍊�') if(arr[1] ==dataAcquisitionInfo.frequency){ setTimeout(()=>{ - n.v.v = dataAcquisitionInfo[str] + let num = 0 + if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ + let str = n.v.ct.fa.split('.')[1] + num = str.length + n.v.v = dataAcquisitionInfo[str]?dataAcquisitionInfo[str].toFixed(num):0 + }else{ + n.v.v = dataAcquisitionInfo[str] + } result = { method:'changeInput', value:{ @@ -55,7 +62,14 @@ }else if(Number(dataAcquisitionInfo.frequency)>num){ if(n.v.ps.value.includes(num)){ setTimeout(()=>{ - n.v.v = dataAcquisitionInfo[str] + let num = 0 + if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ + let str = n.v.ct.fa.split('.')[1] + num = str.length + n.v.v = dataAcquisitionInfo[str]?Number(dataAcquisitionInfo[str]).toFixed(num):0 + }else{ + n.v.v = dataAcquisitionInfo[str] + } result = { method:'changeInput', value:{ @@ -65,20 +79,6 @@ } self.postMessage(JSON.stringify(result)) },2000) - // n.v.v = dataAcquisitionInfo[str] - // result = { - // method:'changeInput', - // value:{ - // list:list, - // n:n - // } - // } - // self.postMessage(JSON.stringify(result)) - // setTimeout(()=>{ - // this.$delete(n.v,'v') - // this.$set(n.v,'v',this.dataAcquisitionInfo[str]) - // this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) - // },1000) } } } -- Gitblit v1.9.3