Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥çæå±å使£éªå |
| | | export function selectBushingBySampleId(query) { |
| | | return request({ |
| | | url: '/insBushing/selectBushingBySampleId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | //æ°å¢è®¾å¤æ¡£æ¡ |
| | | export function addDocument(data) { |
| | | return request({ |
| | | url: "/deviceDocuments/addDocument", |
| | | url: "/documents/add", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | |
| | | // è·åç¸å
³ææ¡£æ°æ®çapi-æ´æ° |
| | | export function updateDocument(data) { |
| | | return request({ |
| | | url: "/deviceDocuments/updateDocument", |
| | | url: "/documents/updateDocument", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | |
| | | //å é¤è®¾å¤æ¡£æ¡ |
| | | export function deleteDocumentById(query) { |
| | | return request({ |
| | | url: "/deviceDocuments/deleteDocumentById", |
| | | url: "/documents/delete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤æ¡£æ¡å表 |
| | | export function getAllDocuments(query) { |
| | | export function getListByDId(query) { |
| | | return request({ |
| | | url: `/deviceDocuments/getAllDocuments`, |
| | | url: '/documents/getListByDId', |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦æ¥è¯¢ |
| | | export function pageByPageQueryOfHomeworkInstructions(query) { |
| | | return request({ |
| | | url: "/instruction/pageByPageQueryOfHomeworkInstructions", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //ä½ä¸æå¯¼ä¹¦ å®¡æ¹ |
| | | export function approvalOfHomeworkInstructionManual(data) { |
| | | return request({ |
| | | url: "/deviceInstruction/approvalOfHomeworkInstructionManual", |
| | | url: "/instruction/approvalOfHomeworkInstructionManual", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | |
| | | //ä½ä¸æå¯¼ä¹¦ å é¤ |
| | | export function homeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/homeworkGuidebook", |
| | | url: "/instruction/homeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | |
| | | //ä½ä¸æå¯¼ä¹¦ ç¼è¾æ¥è¯¢ |
| | | export function homeworkGuidebookEditor(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/homeworkGuidebookEditor", |
| | | url: "/instruction/homeworkGuidebookEditor", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | |
| | | //ä½ä¸æå¯¼ä¹¦æ°å¢ |
| | | export function newHomeworkGuidebookAdded(data) { |
| | | return request({ |
| | | url: "/deviceInstruction/newHomeworkGuidebookAdded", |
| | | url: "/instruction/newHomeworkGuidebookAdded", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | |
| | | //ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤ |
| | | export function deleteHomeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/deleteHomeworkGuidebook", |
| | | url: "/instruction/deleteHomeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦ æ¥è¯¢ |
| | | export function pageByPageQueryOfHomeworkInstructions(query) { |
| | | return request({ |
| | | url: "/deviceInstruction/pageByPageQueryOfHomeworkInstructions", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ |
| | | export function reservationSelectDevice(query) { |
| | | return request({ |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ |
| | | //设å¤é¢çº¦æ¥å£ å é¤ |
| | | export function reservationDelete(query) { |
| | | return request({ |
| | | url: "/reservation/delete", |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ |
| | | //设å¤é¢çº¦æ¥å£ ä¿å |
| | | export function reservationSave(query) { |
| | | return request({ |
| | | url: "/reservation/save", |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ |
| | | // 设å¤è¿è¡æ»è§-æ ¹æ®idè·åè®¾å¤æ
éæ°æ® |
| | | export function device(query) { |
| | | return request({ |
| | | url: "/api/device-faults/device", |
| | | url: "/deviceFaults/device", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | // éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç® |
| | | export function selectStandardProductList(query) { |
| | | return request({ |
| | | url: "/standardTree/selectStandardProductList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾ |
| | | export function getStandardTemplate(query) { |
| | | return request({ |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è·åæ åæ ä¸æ åæ¹æ³æä¸¾ |
| | | export function selectStandardMethodEnum() { |
| | | return request({ |
| | | url: "/standardTree/selectStandardMethodEnum", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·åæ åæ (æ£éªä¸å) |
| | | export function selectStandardTreeList2() { |
| | | return request({ |
| | | url: "/standardTree/selectStandardTreeList2", |
| | | method: "get", |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | // è·åå½åç»å½äººåé¨é¨ |
| | | export function selectUserDepartmentLimsName(query) { |
| | | export function selectUserDepartmentLimsName() { |
| | | return request({ |
| | | url: "/system/newUser/selectUserDepartmentLimsName", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·åå®éªå®¤ä¸çæ£éªåå表 |
| | | export function getLaboratoryPersonList() { |
| | | return request({ |
| | | url: "/system/newUser/getLaboratoryPersonList", |
| | | method: "get", |
| | | }); |
| | | } |
| | |
| | | > .el-submenu__title |
| | | .el-submenu__icon-arrow { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | /* å
¨å±è¡¨æ ¼æ ·å¼ */ |
| | | .el-table th.el-table__cell, |
| | | .has-gutter .el-table__cell { |
| | | background-color: #f0f1f5 !important; |
| | | color: #333; |
| | | } |
| | | |
| | | /* è¡¨æ ¼è¡éä¸èæ¯è² */ |
| | | .el-table__body tr.current-row>td.el-table__cell, |
| | | .el-table__body tr.selection-row>td.el-table__cell { |
| | | background-color: #c1ddf1; |
| | | } |
| | | |
| | | .el-table__header .has-gutter .el-table__cell .cell { |
| | | font-size: 14px !important; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .cell { |
| | | color: #333; |
| | | padding: 0 15px !important; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .cell span { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .el-table .el-table__cell { |
| | | padding: 0 0; |
| | | } |
| | | |
| | | .el-table .el-table__row { |
| | | height: 41px; |
| | | } |
| | | |
| | | .el-table th.el-table__cell>.cell { |
| | | font-size: 14px; |
| | | font-weight: 400; |
| | | color: #333; |
| | | padding: 6px 15px !important; |
| | | } |
| | |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height" |
| | | :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" |
| | | :row-key="rowKey" :span-method="spanMethod" stripe style="width: 100%" tooltip-effect="dark" @row-click="rowClick" |
| | | @current-change="currentChange" @selection-change="handleSelectionChange" class="lims-table"> |
| | | <el-table-column align="center" type="selection" width="55" v-if="isSelection" /> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" :index="indexMethod" /> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | :span-method="spanMethod" |
| | | :stripe="stripe" |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | class="lims-table" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="selection" |
| | | width="55" |
| | | v-if="isSelection" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | width="60" |
| | | :index="indexMethod" |
| | | /> |
| | | |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width |
| | | " align="center"> |
| | | <el-table-column |
| | | v-for="(item, index) in column" |
| | | :key="index" |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | | :filtered-value="item.filteredValue" |
| | | :filters="item.filters" |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip=" |
| | | item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " |
| | | :sortable="item.sortable ? true : false" |
| | | :type="item.type" |
| | | :width=" |
| | | item.dataType === 'action' ? getWidth(item.operation) : item.width |
| | | " |
| | | align="center" |
| | | > |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | <template |
| | | v-if="item.hasOwnProperty('colunmTemplate')" |
| | | :slot="item.colunmTemplate" |
| | | slot-scope="scope" |
| | | > |
| | | <slot |
| | | v-if="item.theadSlot" |
| | | :index="index" |
| | | :name="item.theadSlot" |
| | | :row="scope.row" |
| | | /> |
| | | </template> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | <slot |
| | | v-if="item.slot" |
| | | :index="scope.$index" |
| | | :name="item.slot" |
| | | :row="scope.row" |
| | | /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | |
| | | </div> |
| | | <!-- å¾ç --> |
| | | <div v-else-if="item.dataType == 'image'"> |
| | | <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" /> |
| | | <img |
| | | :src="javaApi + '/img/' + scope.row[item.prop]" |
| | | alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ |
| | | <el-tag |
| | | v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" |
| | | v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " |
| | | :key="index" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)" |
| | | >{{ |
| | | item.tagGroup |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | : tag |
| | | : tag |
| | | }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | <el-button |
| | | v-show="o.type != 'upload'" |
| | | size="mini" |
| | | v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="iconFn(o)" |
| | | :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | :key="key" |
| | | > |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload :action="javaApi + |
| | | o.url + |
| | | '?id=' + |
| | | (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id) |
| | | " size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError" |
| | | :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | <el-upload |
| | | :action=" |
| | | javaApi + |
| | | o.url + |
| | | '?id=' + |
| | | (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id) |
| | | " |
| | | size="mini" |
| | | ref="upload" |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && o.url" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :headers="uploadHeader" |
| | | :on-error="onError" |
| | | :on-exceed="onExceed" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed" |
| | | :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change=" |
| | | (file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && !o.url" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- å¯ç¹å»çæå --> |
| | | <div v-else-if="item.dataType == 'link'" class="cell link" style="width: 100%" |
| | | @click="goLink(scope.row, item.linkMethod)"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <div |
| | | v-else-if="item.dataType == 'link'" |
| | | class="cell" |
| | | style="width: 100%" |
| | | @click="goLink(scope.row, item.linkEvent)" |
| | | > |
| | | <span class="link" v-if="!item.formatData"> |
| | | {{ scope.row[item.prop] }} |
| | | </span> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else class="cell" style="width: 100%"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" style="background-color: #fff" /> |
| | | <pagination |
| | | v-if="page" |
| | | v-show="page.total > 0" |
| | | :total="page.total" |
| | | :layout="page.layout" |
| | | :page.sync="page.current" |
| | | :limit.sync="page.size" |
| | | @pagination="pagination" |
| | | style="background-color: #fff" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | border: { |
| | |
| | | default: true, |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | stripe: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => { }, |
| | | default: () => {}, |
| | | }, |
| | | rowStyle: { |
| | | type: Function, |
| | |
| | | return (this.page.current - 1) * this.page.size + index + 1; |
| | | }, |
| | | // ç¹å»åå
æ ¼linkäºä»¶ |
| | | goLink(row, linkMethod) { |
| | | if (!linkMethod) { |
| | | goLink(row, linkEvent) { |
| | | if (!linkEvent) { |
| | | return this.$message.warning("请é
ç½®lingkäºä»¶"); |
| | | } |
| | | this.$parent[linkMethod](row); |
| | | linkEvent.vueComponent[linkEvent.method](row); |
| | | }, |
| | | // åå¹¶åå
æ ¼ |
| | | calculateSpanInfo() { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table>>>.el-table__empty-text { |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center; |
| | | } |
| | | |
| | | >>>.cell { |
| | | >>> .cell { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | |
| | | cursor: pointer; |
| | | } |
| | | |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | >>> .el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | |
| | | </div> |
| | | <div class="right-menu"> |
| | | <div class="avatar-wrapper"> |
| | | <img :src="avatar" class="user-avatar" /> |
| | | <!-- <img :src="avatar" class="user-avatar" /> --> |
| | | <el-avatar :size="28">{{ nickName.substring(0, 1) }}</el-avatar> |
| | | <span class="userName">{{ nickName }}</span> |
| | | <img |
| | | class="logoout" |
| | |
| | | <template> |
| | | <div id="tags-view-container" class="tags-view-container"> |
| | | <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> |
| | | <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> |
| | | <scroll-pane |
| | | ref="scrollPane" |
| | | class="tags-view-wrapper" |
| | | @scroll="handleScroll" |
| | | > |
| | | <hamburger |
| | | id="hamburger-container" |
| | | :is-active="sidebar.opened" |
| | | class="hamburger-container" |
| | | @toggleClick="toggleSideBar" |
| | | /> |
| | | <router-link |
| | | v-for="tag in visitedViews" |
| | | ref="tag" |
| | | :key="tag.path" |
| | | :class="isActive(tag)?'active':''" |
| | | :class="isActive(tag) ? 'active' : ''" |
| | | :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" |
| | | tag="span" |
| | | class="tags-view-item" |
| | | :style="activeStyle(tag)" |
| | | @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''" |
| | | @contextmenu.prevent.native="openMenu(tag,$event)" |
| | | @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" |
| | | @contextmenu.prevent.native="openMenu(tag, $event)" |
| | | > |
| | | {{ tag.title }} |
| | | <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> |
| | | <span |
| | | v-if="!isAffix(tag)" |
| | | class="el-icon-close" |
| | | @click.prevent.stop="closeSelectedTag(tag)" |
| | | /> |
| | | </router-link> |
| | | </scroll-pane> |
| | | <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> |
| | | <li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> å·æ°é¡µé¢</li> |
| | | <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> å
³éå½å</li> |
| | | <li @click="closeOthersTags"><i class="el-icon-circle-close"></i> å
³éå
¶ä»</li> |
| | | <li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> å
³é左侧</li> |
| | | <li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> å
³éå³ä¾§</li> |
| | | <li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> å
¨é¨å
³é</li> |
| | | <ul |
| | | v-show="visible" |
| | | :style="{ left: left + 'px', top: top + 'px' }" |
| | | class="contextmenu" |
| | | > |
| | | <li @click="refreshSelectedTag(selectedTag)"> |
| | | <i class="el-icon-refresh-right"></i> å·æ°é¡µé¢ |
| | | </li> |
| | | <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"> |
| | | <i class="el-icon-close"></i> å
³éå½å |
| | | </li> |
| | | <li @click="closeOthersTags"> |
| | | <i class="el-icon-circle-close"></i> å
³éå
¶ä» |
| | | </li> |
| | | <li v-if="!isFirstView()" @click="closeLeftTags"> |
| | | <i class="el-icon-back"></i> å
³é左侧 |
| | | </li> |
| | | <li v-if="!isLastView()" @click="closeRightTags"> |
| | | <i class="el-icon-right"></i> å
³éå³ä¾§ |
| | | </li> |
| | | <li @click="closeAllTags(selectedTag)"> |
| | | <i class="el-icon-circle-close"></i> å
¨é¨å
³é |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScrollPane from './ScrollPane' |
| | | import path from 'path' |
| | | import ScrollPane from "./ScrollPane"; |
| | | import path from "path"; |
| | | import Hamburger from "@/components/Hamburger/index.vue"; |
| | | import {mapGetters} from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | components: {Hamburger, ScrollPane }, |
| | | components: { Hamburger, ScrollPane }, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | top: 0, |
| | | left: 0, |
| | | selectedTag: {}, |
| | | affixTags: [] |
| | | } |
| | | affixTags: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'sidebar', |
| | | ]), |
| | | ...mapGetters(["sidebar"]), |
| | | visitedViews() { |
| | | return this.$store.state.tagsView.visitedViews |
| | | return this.$store.state.tagsView.visitedViews; |
| | | }, |
| | | routes() { |
| | | return this.$store.state.permission.routes |
| | | return this.$store.state.permission.routes; |
| | | }, |
| | | theme() { |
| | | return this.$store.state.settings.theme; |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | this.addTags() |
| | | this.moveToCurrentTag() |
| | | this.addTags(); |
| | | this.moveToCurrentTag(); |
| | | }, |
| | | visible(value) { |
| | | if (value) { |
| | | document.body.addEventListener('click', this.closeMenu) |
| | | document.body.addEventListener("click", this.closeMenu); |
| | | } else { |
| | | document.body.removeEventListener('click', this.closeMenu) |
| | | document.body.removeEventListener("click", this.closeMenu); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initTags() |
| | | this.addTags() |
| | | this.initTags(); |
| | | this.addTags(); |
| | | }, |
| | | methods: { |
| | | toggleSideBar() { |
| | | this.$store.dispatch('app/toggleSideBar') |
| | | this.$store.dispatch("app/toggleSideBar"); |
| | | }, |
| | | isActive(route) { |
| | | return route.path === this.$route.path |
| | | return route.path === this.$route.path; |
| | | }, |
| | | activeStyle(tag) { |
| | | if (!this.isActive(tag)) return {}; |
| | | return { |
| | | "background-color": this.theme, |
| | | "border-color": this.theme |
| | | "border-color": this.theme, |
| | | }; |
| | | }, |
| | | isAffix(tag) { |
| | | return tag.meta && tag.meta.affix |
| | | return tag.meta && tag.meta.affix; |
| | | }, |
| | | isFirstView() { |
| | | try { |
| | | return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath |
| | | return ( |
| | | this.selectedTag.fullPath === "/index" || |
| | | this.selectedTag.fullPath === this.visitedViews[1].fullPath |
| | | ); |
| | | } catch (err) { |
| | | return false |
| | | return false; |
| | | } |
| | | }, |
| | | isLastView() { |
| | | try { |
| | | return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath |
| | | return ( |
| | | this.selectedTag.fullPath === |
| | | this.visitedViews[this.visitedViews.length - 1].fullPath |
| | | ); |
| | | } catch (err) { |
| | | return false |
| | | return false; |
| | | } |
| | | }, |
| | | filterAffixTags(routes, basePath = '/') { |
| | | let tags = [] |
| | | routes.forEach(route => { |
| | | filterAffixTags(routes, basePath = "/") { |
| | | let tags = []; |
| | | routes.forEach((route) => { |
| | | if (route.meta && route.meta.affix) { |
| | | const tagPath = path.resolve(basePath, route.path) |
| | | const tagPath = path.resolve(basePath, route.path); |
| | | tags.push({ |
| | | fullPath: tagPath, |
| | | path: tagPath, |
| | | name: route.name, |
| | | meta: { ...route.meta } |
| | | }) |
| | | meta: { ...route.meta }, |
| | | }); |
| | | } |
| | | if (route.children) { |
| | | const tempTags = this.filterAffixTags(route.children, route.path) |
| | | const tempTags = this.filterAffixTags(route.children, route.path); |
| | | if (tempTags.length >= 1) { |
| | | tags = [...tags, ...tempTags] |
| | | tags = [...tags, ...tempTags]; |
| | | } |
| | | } |
| | | }) |
| | | return tags |
| | | }); |
| | | return tags; |
| | | }, |
| | | initTags() { |
| | | const affixTags = this.affixTags = this.filterAffixTags(this.routes) |
| | | const affixTags = (this.affixTags = this.filterAffixTags(this.routes)); |
| | | for (const tag of affixTags) { |
| | | // Must have tag name |
| | | if (tag.name) { |
| | | this.$store.dispatch('tagsView/addVisitedView', tag) |
| | | this.$store.dispatch("tagsView/addVisitedView", tag); |
| | | } |
| | | } |
| | | }, |
| | | addTags() { |
| | | const { name } = this.$route |
| | | const { name } = this.$route; |
| | | if (name) { |
| | | this.$store.dispatch('tagsView/addView', this.$route) |
| | | this.$store.dispatch("tagsView/addView", this.$route); |
| | | } |
| | | }, |
| | | moveToCurrentTag() { |
| | | const tags = this.$refs.tag |
| | | const tags = this.$refs.tag; |
| | | this.$nextTick(() => { |
| | | for (const tag of tags) { |
| | | if (tag.to.path === this.$route.path) { |
| | | this.$refs.scrollPane.moveToTarget(tag) |
| | | this.$refs.scrollPane.moveToTarget(tag); |
| | | // when query is different then update |
| | | if (tag.to.fullPath !== this.$route.fullPath) { |
| | | this.$store.dispatch('tagsView/updateVisitedView', this.$route) |
| | | this.$store.dispatch("tagsView/updateVisitedView", this.$route); |
| | | } |
| | | break |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | refreshSelectedTag(view) { |
| | | this.$tab.refreshPage(view); |
| | | if (this.$route.meta.link) { |
| | | this.$store.dispatch('tagsView/delIframeView', this.$route) |
| | | this.$store.dispatch("tagsView/delIframeView", this.$route); |
| | | } |
| | | }, |
| | | closeSelectedTag(view) { |
| | | this.$tab.closePage(view).then(({ visitedViews }) => { |
| | | if (this.isActive(view)) { |
| | | this.toLastView(visitedViews, view) |
| | | this.toLastView(visitedViews, view); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeRightTags() { |
| | | this.$tab.closeRightPage(this.selectedTag).then(visitedViews => { |
| | | if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews) |
| | | this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => { |
| | | if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeLeftTags() { |
| | | this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => { |
| | | if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews) |
| | | this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => { |
| | | if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeOthersTags() { |
| | | this.$router.push(this.selectedTag.fullPath).catch(()=>{}); |
| | | this.$router.push(this.selectedTag.fullPath).catch(() => {}); |
| | | this.$tab.closeOtherPage(this.selectedTag).then(() => { |
| | | this.moveToCurrentTag() |
| | | }) |
| | | this.moveToCurrentTag(); |
| | | }); |
| | | }, |
| | | closeAllTags(view) { |
| | | this.$tab.closeAllPage().then(({ visitedViews }) => { |
| | | if (this.affixTags.some(tag => tag.path === this.$route.path)) { |
| | | return |
| | | if (this.affixTags.some((tag) => tag.path === this.$route.path)) { |
| | | return; |
| | | } |
| | | this.toLastView(visitedViews, view) |
| | | }) |
| | | this.toLastView(visitedViews, view); |
| | | }); |
| | | }, |
| | | toLastView(visitedViews, view) { |
| | | const latestView = visitedViews.slice(-1)[0] |
| | | const latestView = visitedViews.slice(-1)[0]; |
| | | if (latestView) { |
| | | this.$router.push(latestView.fullPath) |
| | | this.$router.push(latestView.fullPath); |
| | | } else { |
| | | // now the default is to redirect to the home page if there is no tags-view, |
| | | // you can adjust it according to your needs. |
| | | if (view.name === 'Dashboard') { |
| | | if (view.name === "Dashboard") { |
| | | // to reload home page |
| | | this.$router.replace({ path: '/redirect' + view.fullPath }) |
| | | this.$router.replace({ path: "/redirect" + view.fullPath }); |
| | | } else { |
| | | this.$router.push('/') |
| | | this.$router.push("/"); |
| | | } |
| | | } |
| | | }, |
| | | openMenu(tag, e) { |
| | | const menuMinWidth = 105 |
| | | const offsetLeft = this.$el.getBoundingClientRect().left // container margin left |
| | | const offsetWidth = this.$el.offsetWidth // container width |
| | | const maxLeft = offsetWidth - menuMinWidth // left boundary |
| | | const left = e.clientX - offsetLeft + 15 // 15: margin right |
| | | const menuMinWidth = 105; |
| | | const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left |
| | | const offsetWidth = this.$el.offsetWidth; // container width |
| | | const maxLeft = offsetWidth - menuMinWidth; // left boundary |
| | | const left = e.clientX - offsetLeft + 15; // 15: margin right |
| | | |
| | | if (left > maxLeft) { |
| | | this.left = maxLeft |
| | | this.left = maxLeft; |
| | | } else { |
| | | this.left = left |
| | | this.left = left; |
| | | } |
| | | |
| | | this.top = e.clientY |
| | | this.visible = true |
| | | this.selectedTag = tag |
| | | this.top = e.clientY; |
| | | this.visible = true; |
| | | this.selectedTag = tag; |
| | | }, |
| | | closeMenu() { |
| | | this.visible = false |
| | | this.visible = false; |
| | | }, |
| | | handleScroll() { |
| | | this.closeMenu() |
| | | } |
| | | } |
| | | } |
| | | this.closeMenu(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | z-index: 1000; /* ç¡®ä¿å¤´é¨å¨å
¶ä»å
容ä¹ä¸ */ |
| | | background: #fff; |
| | | border-bottom: 1px solid #d8dce5; |
| | | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); |
| | | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); |
| | | .tags-view-wrapper { |
| | | .hamburger-container { |
| | | display: inline-block; |
| | | line-height: 46px; |
| | | height: 100%; |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | -webkit-tap-highlight-color:transparent; |
| | | transition: background 0.3s; |
| | | -webkit-tap-highlight-color: transparent; |
| | | padding: 0 10px !important; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | .tags-view-item { |
| | |
| | | color: #fff; |
| | | border-color: #42b983; |
| | | &::before { |
| | | content: ''; |
| | | content: ""; |
| | | background: #fff; |
| | | display: inline-block; |
| | | width: 8px; |
| | |
| | | } |
| | | } |
| | | .contextmenu { |
| | | margin: 0; |
| | | margin: -20px; |
| | | background: #fff; |
| | | z-index: 3000; |
| | | position: absolute; |
| | |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | color: #333; |
| | | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3); |
| | | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); |
| | | li { |
| | | margin: 0; |
| | | padding: 7px 16px; |
| | |
| | | vertical-align: 2px; |
| | | border-radius: 50%; |
| | | text-align: center; |
| | | transition: all .3s cubic-bezier(.645, .045, .355, 1); |
| | | transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | transform-origin: 100% 50%; |
| | | &:before { |
| | | transform: scale(.6); |
| | | transform: scale(0.6); |
| | | display: inline-block; |
| | | vertical-align: -3px; |
| | | } |
| | |
| | | permissions: ['business:order'], |
| | | children: [ |
| | | { |
| | | // éææä¸å |
| | | // æ°å¢å§æåé¡µé¢ |
| | | path: 'addOrder', |
| | | component: () => import('@/views/business/inspectionOrder/add'), |
| | | name: 'addOrder', |
| | | meta: { title: 'æ°å¢å§æå', activeMenu: '/business/inspectionOrder' } |
| | | }, |
| | | { |
| | | // æ¥çå§æå详æ
é¡µé¢ |
| | | path: 'showDetails', |
| | | component: () => import('@/views/business/inspectionOrder/add'), |
| | | name: 'showDetails', |
| | | meta: { title: 'å§æå详æ
', activeMenu: '/business/inspectionOrder' } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | avatar: (state) => state.user.avatar, |
| | | name: (state) => state.user.name, |
| | | nickName: (state) => state.user.nickName, |
| | | companyName: (state) => state.user.companyName, |
| | | loginUserInfo: (state) => state.user.loginUserInfo, |
| | | userId: (state) => state.user.id, |
| | | introduction: (state) => state.user.introduction, |
| | | roles: (state) => state.user.roles, |
| | |
| | | name: "", |
| | | avatar: "", |
| | | nickName: "", |
| | | companyName: "", |
| | | loginUserInfo: {}, |
| | | roles: [], |
| | | permissions: [], |
| | | }, |
| | |
| | | }, |
| | | SET_NICKNAME: (state, nickName) => { |
| | | state.nickName = nickName; |
| | | }, |
| | | SET_COMPANYNAME: (state, companyName) => { |
| | | state.companyName = companyName; |
| | | }, |
| | | SET_LOGINUSERINFO: (state, loginUserInfo) => { |
| | | state.loginUserInfo = loginUserInfo; |
| | | }, |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles; |
| | |
| | | return new Promise((resolve, reject) => { |
| | | getInfo() |
| | | .then((res) => { |
| | | console.log("store-->",res); |
| | | const user = res.user; |
| | | let avatar = user.avatar || ""; |
| | | if (!isHttp(avatar)) { |
| | |
| | | } else { |
| | | commit("SET_ROLES", ["ROLE_DEFAULT"]); |
| | | } |
| | | commit("SET_LOGINUSERINFO", user); |
| | | commit("SET_ID", user.userId); |
| | | commit("SET_NAME", user.userName); |
| | | commit("SET_AVATAR", avatar); |
| | | commit("SET_NICKNAME", user.nickName); |
| | | commit("SET_COMPANYNAME", user.companyName); |
| | | resolve(res); |
| | | }) |
| | | .catch((error) => { |
| | |
| | | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <div> |
| | | <el-form :model="entity" inline label-position="right" label-width="80px"> |
| | | <div style="margin-top: 10px"> |
| | | <el-form :model="entity" inline label-position="right"> |
| | | <el-form-item label="ç¶æ:"> |
| | | <el-select v-model="entity.deviceStatus" placeholder="å
¨é¨" size="small" clearable> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | |
| | | @click="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <div class="search_thing"> |
| | | <div class="search_label">ç¶æï¼</div> |
| | | <el-select v-model="entity.deviceStatus" placeholder="å
¨é¨" size="small" clearable> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">设å¤åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.deviceName"></el-input> |
| | | </div> |
| | | </div> --> |
| | | |
| | | |
| | | <!-- <div class="search_thing" style="padding-left: 30px;"> |
| | | </div> --> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable()" :finishLoding="finishLoding" :list="list" |
| | |
| | | entity: { |
| | | deviceStatus: null, |
| | | deviceName: null, |
| | | orderBy: { field: "id", order: "asc" } |
| | | }, |
| | | options: [], |
| | | list: [], |
| | |
| | | ...this.entity |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.total = res.data.body.total |
| | | let list = res.data.body.records.map(m => { |
| | | this.total = res.data.total |
| | | let list = res.data.records.map(m => { |
| | | switch (m.deviceStatus) { |
| | | case 0: |
| | | // æ£å¸¸ |
| | |
| | | updateDocument, |
| | | addDocument, |
| | | deleteDocumentById, |
| | | getAllDocuments, |
| | | selectDeviceByCode, |
| | | upDeviceParameter, |
| | | exportDeviceFile, |
| | | getInsProduction, |
| | | getInsProduction, getListByDId, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { |
| | |
| | | }, |
| | | // è·åç¸å
³ææ¡£æ°æ®çapi |
| | | getPage() { |
| | | getAllDocuments({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | getListByDId({ id: this.clickNodeVal.value }).then(res => { |
| | | if (res.code == 200) |
| | | this.tableDataA = res.data |
| | | }) |
| | |
| | | <!-- 设å¤å·¥å
·æç» --> |
| | | <template> |
| | | <div class="role_manage"> |
| | | <div class="search" v-show="!showData"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¶æï¼</div> |
| | | <el-select v-model="queryParams.deviceStatus" placeholder="å
¨é¨" size="small"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">设å¤åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.deviceName" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">è§æ ¼åå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible2 = true">æ° å¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleDownOne">导 åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table" v-show="!showData"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 320px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="isUp ? '设å¤è¯¦æ
' : 'æ¡£æ¡ä¿®è®¢'" :visible.sync="dialogVisible" width="70%" |
| | | top="5vh" |
| | | :before-close="handleClose"> |
| | | <el-row style="display:flex;justify-content: space-around;"> |
| | | <div class="role_manage"> |
| | | <div class="search" v-show="!showData"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¶æï¼</div> |
| | | <el-select |
| | | v-model="queryParams.deviceStatus" |
| | | placeholder="å
¨é¨" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in deviceStatusList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">设å¤åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="queryParams.deviceName" |
| | | @keyup.enter.native="refreshTable()" |
| | | > |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">è§æ ¼åå·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="queryParams.specificationModel" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div style="padding-left: 30px"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="dialogVisible2 = true" |
| | | >æ° å¢</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="handleDownOne" |
| | | >导 åº</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="table" v-show="!showData"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 320px)'" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | | </div> |
| | | <el-dialog |
| | | :title="isUp ? '设å¤è¯¦æ
' : 'æ¡£æ¡ä¿®è®¢'" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | top="5vh" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-row style="display: flex; justify-content: space-around"> |
| | | <!-- 左边å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-col> |
| | | <!-- å¾ç --> |
| | | <el-image class="img" style="width:100%;height: 320px;marginBottom:16px" |
| | | :src="javaApi + '/img/' + formData.imageUpload"> |
| | | <div slot="error" class="image-error" style="width: calc(100% -2px); |
| | | height: 318px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:60px;color:#666666;"></i> |
| | | <el-image |
| | | class="img" |
| | | style="width: 100%; height: 320px; marginbottom: 16px" |
| | | :src="javaApi + '/img/' + formData.imageUpload" |
| | | > |
| | | <div |
| | | slot="error" |
| | | class="image-error" |
| | | style=" |
| | | width: calc(100% -2px); |
| | | height: 318px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #eeeeee; |
| | | " |
| | | > |
| | | <i |
| | | class="el-icon-picture-outline" |
| | | style="font-size: 60px; color: #666666" |
| | | ></i> |
| | | </div> |
| | | </el-image> |
| | | <!-- 表å --> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="120px"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData" |
| | | label-width="120px" |
| | | > |
| | | <el-form-item label="仪å¨åç§°:" required> |
| | | <el-input :disabled="isUp" v-model="formData.deviceName" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.deviceName" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仪å¨åç§°EN:" required> |
| | | <el-input :disabled="isUp" v-model="formData.enDeviceName" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.enDeviceName" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼åå·:" required> |
| | | <el-input :disabled="isUp" v-model="formData.specificationModel" |
| | | size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.specificationModel" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå®¶:"> |
| | | <el-input :disabled="isUp" v-model="formData.manufacturer" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.manufacturer" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-col> |
| | | <!-- ä¸é´å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="116px"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData" |
| | | label-width="116px" |
| | | > |
| | | <el-form-item label="æ ¡åæå¡æºæ:"> |
| | | <el-input disabled v-model="formData.calibrationServices" size="small"></el-input> |
| | | <el-input |
| | | disabled |
| | | v-model="formData.calibrationServices" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åºåç¼å·:"> |
| | | <el-input :disabled="isUp" v-model="formData.factoryNo" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.factoryNo" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管çç¼å·:" required> |
| | | <el-input :disabled="isUp" v-model="formData.managementNumber" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.managementNumber" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è´ç½®æ¥æ:"> |
| | | <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.acquisitionDate" |
| | | type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" |
| | | placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | :disabled="isUp" |
| | | style="width: 100%" |
| | | v-model="formData.acquisitionDate" |
| | | type="date" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç¨æ¥æ:" required> |
| | | <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.activationDate" |
| | | type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" |
| | | placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | :disabled="isUp" |
| | | style="width: 100%" |
| | | v-model="formData.activationDate" |
| | | type="date" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="管ç人:"> |
| | | <el-select v-model="formData.equipmentManager" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option :disabled="isUp" v-for="item in responsiblePersonList" :key="item.value" |
| | | :label="item.label" :value="item.value"> |
| | | <el-select |
| | | v-model="formData.equipmentManager" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | :disabled="isUp" |
| | | v-for="item in responsiblePersonList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åæ¾ç¹:"> |
| | | <el-input :disabled="isUp" v-model="formData.storagePoint" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.storagePoint" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¯ææ :"> |
| | | <el-input :disabled="isUp" v-model="formData.technicalIndicators" :rows="7" type="textarea" |
| | | size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.technicalIndicators" |
| | | :rows="7" |
| | | type="textarea" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <!-- å³è¾¹å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="140px" ref="ruleForm"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData" |
| | | label-width="140px" |
| | | ref="ruleForm" |
| | | > |
| | | <!-- å®éªå®¤å表 --> |
| | | <el-form-item label="æå±é¨é¨:"> |
| | | <el-select :disabled="isUp" v-model="formData.subordinateDepartmentsId" placeholder="è¯·éæ©" |
| | | size="small" style="width:100%"> |
| | | <el-option v-for="item in subordinateDepartmentsList" :key="item.value" |
| | | :label="item.label" :value="item.value"> |
| | | <el-select |
| | | :disabled="isUp" |
| | | v-model="formData.subordinateDepartmentsId" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in subordinateDepartmentsList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£æµé¡¹ç®:"> |
| | | <el-cascader :disabled="isUp" v-model="formData.insProductIds" :options="options" |
| | | :show-all-levels="false" :props="props" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%;" :collapse-tags="!isUp" separator="," filterable |
| | | clearable></el-cascader> |
| | | <el-cascader |
| | | :disabled="isUp" |
| | | v-model="formData.insProductIds" |
| | | :options="options" |
| | | :show-all-levels="false" |
| | | :props="props" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | :collapse-tags="!isUp" |
| | | separator="," |
| | | filterable |
| | | clearable |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿æ ¡åæ¥æ:" v-if="isUp"> |
| | | <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.latestTraceability" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" |
| | | placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | :disabled="isUp" |
| | | style="width: 100%" |
| | | v-model="formData.latestTraceability" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="䏿¬¡æ ¡åæ¥æ:" v-if="isUp"> |
| | | <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.latestTraceability" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" |
| | | placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | :disabled="isUp" |
| | | style="width: 100%" |
| | | v-model="formData.latestTraceability" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç±»å:"> |
| | | <el-select :disabled="isUp" v-model="formData.largeCategory" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | <el-select |
| | | :disabled="isUp" |
| | | v-model="formData.largeCategory" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in equipmentList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åä»·(ä¸å
):"> |
| | | <el-input :disabled="isUp" v-model="formData.unitPrice" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.unitPrice" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½åç¶æ:" required> |
| | | <el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | <el-select |
| | | :disabled="isUp" |
| | | v-model="formData.deviceStatus" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in deviceStatusList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ¡åå¨æï¼æï¼:" required> |
| | | <el-input :disabled="isUp" v-model="formData.calibrationDate" size="small"></el-input> |
| | | <el-input |
| | | :disabled="isUp" |
| | | v-model="formData.calibrationDate" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å¾ç:"> |
| | | <div |
| | | style="border: 1px solid #DCDFE6;border-radius:4px;height:32px;lineHeight:32px;display:flex;justify-content: space-around;font-size: 13px;"> |
| | | <div v-show="formData.imageName" class="picName">{{ formData.imageName }}</div> |
| | | <el-upload :disabled="isUp" :action="action" :on-success="handleSuccessUpImg2" |
| | | :show-file-list="false" accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" |
| | | :on-change="beforeUpload" :on-error="onError" ref='upload'> |
| | | <el-button type="text" style="height:30px;padding-top:8px">ä¸ä¼ </el-button> |
| | | style=" |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | height: 32px; |
| | | lineheight: 32px; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | font-size: 13px; |
| | | " |
| | | > |
| | | <div v-show="formData.imageName" class="picName"> |
| | | {{ formData.imageName }} |
| | | </div> |
| | | <el-upload |
| | | :disabled="isUp" |
| | | :action="action" |
| | | :on-success="handleSuccessUpImg2" |
| | | :show-file-list="false" |
| | | accept="image/jpg,image/jpeg,image/png" |
| | | :headers="uploadHeader" |
| | | :on-change="beforeUpload" |
| | | :on-error="onError" |
| | | ref="upload" |
| | | > |
| | | <el-button type="text" style="height: 30px; padding-top: 8px" |
| | | >ä¸ä¼ </el-button |
| | | > |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row v-if="!isUp"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | <el-row v-if="!isUp"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°å¢--> |
| | | <el-dialog title="æ°å¢è®¾å¤" top="5vh" :visible.sync="dialogVisible2" width="70%" :before-close="handleClose2"> |
| | | <el-row style="display:flex;justify-content: space-around;"> |
| | | <el-dialog |
| | | title="æ°å¢è®¾å¤" |
| | | top="5vh" |
| | | :visible.sync="dialogVisible2" |
| | | width="70%" |
| | | :before-close="handleClose2" |
| | | > |
| | | <el-row style="display: flex; justify-content: space-around"> |
| | | <!-- 左边å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-col> |
| | | <!-- å¾ç --> |
| | | <el-image class="img" style="width:100%;height: 320px;margin-bottom:16px" |
| | | :src="javaApi + '/img/' + formData2.imageUpload"> |
| | | <div slot="error" class="image-error" style="width: calc(100% -2px); |
| | | height: 318px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:60px;color:#666666;"></i> |
| | | <el-image |
| | | class="img" |
| | | style="width: 100%; height: 320px; margin-bottom: 16px" |
| | | :src="javaApi + '/img/' + formData2.imageUpload" |
| | | > |
| | | <div |
| | | slot="error" |
| | | class="image-error" |
| | | style=" |
| | | width: calc(100% -2px); |
| | | height: 318px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #eeeeee; |
| | | " |
| | | > |
| | | <i |
| | | class="el-icon-picture-outline" |
| | | style="font-size: 60px; color: #666666" |
| | | ></i> |
| | | </div> |
| | | </el-image> |
| | | <!-- 表å --> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="120px"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData2" |
| | | label-width="120px" |
| | | > |
| | | <el-form-item label="仪å¨åç§°:" required> |
| | | <el-input v-model="formData2.deviceName" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.deviceName" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仪å¨åç§°EN:" required> |
| | | <el-input v-model="formData2.enDeviceName" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.enDeviceName" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼åå·:" required> |
| | | <el-input v-model="formData2.specificationModel" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.specificationModel" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå®¶:"> |
| | | <el-input v-model="formData2.manufacturer" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.manufacturer" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-col> |
| | | <!-- ä¸é´å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="110px"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData2" |
| | | label-width="110px" |
| | | > |
| | | <!-- <el-form-item label="ç产åå®¶EN:"> |
| | | <el-input v-model="formData2.factoryNo" size="small"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="æ ¡åæå¡æºæ:"> |
| | | <el-input v-model="formData2.calibrationServices" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.calibrationServices" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åºåç¼å·:"> |
| | | <el-input v-model="formData2.factoryNo" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管çç¼å·:" required> |
| | | <el-input v-model="formData2.managementNumber" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.managementNumber" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è´ç½®æ¥æ:"> |
| | | <el-date-picker style="width:100%" v-model="formData2.acquisitionDate" type="date" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData2.acquisitionDate" |
| | | type="date" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç¨æ¥æ:" required> |
| | | <el-date-picker style="width:100%" v-model="formData2.activationDate" type="date" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData2.activationDate" |
| | | type="date" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="管ç人:"> |
| | | <el-select v-model="formData2.equipmentManager" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in responsiblePersonList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | <el-select |
| | | v-model="formData2.equipmentManager" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in responsiblePersonList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åæ¾ç¹:"> |
| | | <el-input v-model="formData2.storagePoint" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.storagePoint" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¯ææ :"> |
| | | <el-input v-model="formData2.technicalIndicators" :rows="7" type="textarea" |
| | | size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.technicalIndicators" |
| | | :rows="7" |
| | | type="textarea" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <!-- å³è¾¹å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="120px" ref="ruleForm"> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData2" |
| | | label-width="120px" |
| | | ref="ruleForm" |
| | | > |
| | | <!-- å®éªå®¤å表 --> |
| | | <el-form-item label="æå±é¨é¨:"> |
| | | <el-select v-model="formData2.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in subordinateDepartmentsList" :key="item.value" |
| | | :label="item.label" :value="item.value"> |
| | | <el-select |
| | | v-model="formData2.subordinateDepartmentsId" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in subordinateDepartmentsList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£æµé¡¹ç®:"> |
| | | <el-cascader v-model="formData2.insProductIds" :options="options" :show-all-levels="false" |
| | | :props="props" placeholder="è¯·éæ©" size="small" style="width:100%" collapse-tags |
| | | separator="," filterable clearable></el-cascader> |
| | | <el-cascader |
| | | v-model="formData2.insProductIds" |
| | | :options="options" |
| | | :show-all-levels="false" |
| | | :props="props" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | collapse-tags |
| | | separator="," |
| | | filterable |
| | | clearable |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç±»å:"> |
| | | <el-select v-model="formData2.largeCategory" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | <el-select |
| | | v-model="formData2.largeCategory" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in equipmentList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-input v-model="formData2.unitPrice" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½åç¶æ:" required> |
| | | <el-select v-model="formData2.deviceStatus" placeholder="è¯·éæ©" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" |
| | | :value="item.value"> |
| | | <el-select |
| | | v-model="formData2.deviceStatus" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in deviceStatusList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ¡åå¨æï¼æï¼:" required> |
| | | <el-input v-model="formData2.calibrationDate" size="small"></el-input> |
| | | <el-input |
| | | v-model="formData2.calibrationDate" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å¾ç:"> |
| | | <div |
| | | style="border: 1px solid #DCDFE6;border-radius:4px;height:32px;line-height:32px;display:flex;justify-content: space-around;font-size: 13px;"> |
| | | <div v-show="formData2.imageName" class="picName">{{ formData2.imageName }}</div> |
| | | <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" |
| | | accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload'> |
| | | <el-button type="text" style="height:30px;padding-top:8px">ä¸ä¼ </el-button> |
| | | style=" |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | font-size: 13px; |
| | | " |
| | | > |
| | | <div v-show="formData2.imageName" class="picName"> |
| | | {{ formData2.imageName }} |
| | | </div> |
| | | <el-upload |
| | | :action="action" |
| | | :on-success="handleSuccessUpImg2" |
| | | :show-file-list="false" |
| | | accept="image/jpg,image/jpeg,image/png" |
| | | :headers="uploadHeader" |
| | | :on-change="beforeUpload" |
| | | :on-error="onError" |
| | | ref="upload" |
| | | > |
| | | <el-button type="text" style="height: 30px; padding-top: 8px" |
| | | >ä¸ä¼ </el-button |
| | | > |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose2">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad2">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | <el-row> |
| | | <el-button @click="handleClose2">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad2" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ°éé
ç½®" :visible.sync="dialogVisible3" width="400px"> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>IPï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.ip"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>IPï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.ip" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ééå°åï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.collectUrl"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>ééå°åï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.collectUrl" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>å¨åå°åï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.storageUrl"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>å¨åå°åï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.storageUrl" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>åç
§ï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.refer"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>åç
§ï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.refer" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>Xï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.x"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>Xï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.x" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>Yï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.y"></el-input> |
| | | <div class="search_thing" style="margin-bottom: 14px"> |
| | | <div class="search_label"> |
| | | <span style="color: red; margin-right: 4px">*</span>Yï¼ |
| | | </div> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.y" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å
¬å¼ï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.formula"></el-input> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="configForm.formula" |
| | | ></el-input> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="dialogVisible3 = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm3" :loading="upLoad3">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | <el-row> |
| | | <el-button @click="dialogVisible3 = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm3" :loading="upLoad3" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <dataAcquisitionConfig v-if="showData" :deviceId="deviceId" /> |
| | | </div> |
| | | <dataAcquisitionConfig v-if="showData" :deviceId="deviceId" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import dataAcquisitionConfig from './acquisitionConfig.vue' |
| | | import dataAcquisitionConfig from "./acquisitionConfig.vue"; |
| | | import { |
| | | obtainItemParameterList, |
| | | exportEquipmentDetails, |
| | | getInsProduction, |
| | | upDeviceParameter, |
| | | addDeviceParameter, |
| | | numberCollect, |
| | | getDeviceParameter, |
| | | delDeviceParameter, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | obtainItemParameterList, |
| | | exportEquipmentDetails, |
| | | getInsProduction, |
| | | upDeviceParameter, |
| | | addDeviceParameter, |
| | | numberCollect, |
| | | getDeviceParameter, |
| | | delDeviceParameter, |
| | | } from "@/api/cnas/resourceDemand/device.js"; |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | limsTable, |
| | | dataAcquisitionConfig, |
| | | }, |
| | | data() { |
| | | return { |
| | | dateFormat: 'yyyy-MM-dd', |
| | | deviceId: '', |
| | | fileTypeOptions: [ |
| | | { label: 'csv', value: '.csv' }, |
| | | { label: 'db', value: '.db' }, |
| | | { label: 'mdb', value: '.mdb' }, |
| | | { label: 'word', value: '.docx' }, |
| | | { label: 'excel', value: '.xlsx' }, |
| | | { label: 'txt', value: '.txt' }, |
| | | { label: 'png', value: '.png' }, |
| | | ], |
| | | //æ¯å¦æ¯æ¡£æ¡ä¿®è®¢ true䏿¯ falseæ¯ |
| | | isUp: true, |
| | | formData: { |
| | | authorizedPerson: [] |
| | | }, |
| | | formData2: { |
| | | imageUpload: '', |
| | | imageName: '', |
| | | deviceStatus: '', |
| | | authorizedPerson: [] |
| | | }, |
| | | value: '', |
| | | props: { multiple: true, emitPath: false, value: 'id', label: 'name' }, |
| | | options: [], |
| | | labelPosition: 'right', |
| | | dialogVisible: false, |
| | | dialogVisible2: false, |
| | | addPower: false, |
| | | showData: false, // æ°éé
ç½®é¡µé¢ |
| | | tableList: [], |
| | | addDia: true, |
| | | addPower: true, |
| | | //设å¤ç±»åå表 |
| | | equipmentList: [], |
| | | // è´è´£äººå表 |
| | | responsiblePersonList: [], |
| | | // ææäººå表 |
| | | authorizerList: [], |
| | | // å½åç¶æå表 |
| | | deviceStatusList: [], |
| | | // æå±é¨é¨ |
| | | subordinateDepartmentsList: [], |
| | | upLoad: false, |
| | | upLoad2: false, |
| | | dialogVisible3: false, |
| | | upLoad3: false, |
| | | configForm: {}, |
| | | laboratoryNameIsNull: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "设å¤åç§°", prop: "deviceName", dataType: 'link', linkMethod: 'selectAllByOne' }, |
| | | { label: "设å¤åç§°EN", prop: "enDeviceName" }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "specificationModel", |
| | | }, |
| | | { label: "ç产åå®¶", prop: "manufacturer" }, |
| | | { label: "åºåç¼å·", prop: "factoryNo" }, |
| | | { label: "管çç¼å·", prop: "managementNumber" }, |
| | | { label: "ææ¯ææ ", prop: "technicalIndicators" }, |
| | | { label: "è´ç½®æ¥æ", prop: "acquisitionDate" }, |
| | | { label: "å¯ç¨æ¥æ", prop: "activationDate" }, |
| | | { label: "管ç人", prop: "equipmentManagerUser" }, |
| | | { label: "åæ¾ç¹", prop: "storagePoint" }, |
| | | { label: "æå±é¨é¨", prop: "laboratoryName" }, |
| | | { label: "æ£éªé¡¹ç®", prop: "insProductItem" }, |
| | | { label: "æ ¡åæå¡æºæ", prop: "calibrationServices" }, |
| | | { label: "æè¿æ ¡åæ¥æ", prop: "lastCalibrationDateTwo" }, |
| | | { label: "æè¿æ ¸æ¥æ¥æ", prop: "lastCalibrationDate" }, |
| | | { label: "䏿¬¡æ ¡åæ¥æ", prop: "nextCalibrationDateTwo" }, |
| | | { label: "䏿¬¡æ ¸æ¥æ¥æ", prop: "nextCalibrationDate" }, |
| | | { |
| | | label: "设å¤åç±»", prop: "largeCategory", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.equipmentList.find(m => m.value == params).label |
| | | }, |
| | | formatType: (params) => { |
| | | return this.equipmentList.find(m => m.value == params).type |
| | | } |
| | | }, |
| | | { label: "åä»·", prop: "unitPrice" }, |
| | | { |
| | | label: "设å¤ç¶æ", prop: "deviceStatus", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.deviceStatusList.find(m => m.value == params).label |
| | | }, |
| | | formatType: (params) => { |
| | | return this.deviceStatusList.find(m => m.value == params).type |
| | | } |
| | | }, |
| | | { label: "æ ¡å卿(æ)", prop: "calibrationDate" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¡£æ¡ä¿®è®¢", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.isUpdate(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ°éé
ç½®", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleConfig(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.insProductItem == null || row.insProductItem === '' |
| | | } |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/deviceScope/uploadFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectEnumByCategory() |
| | | this.selectDevicePrincipal() |
| | | this.obtainItemParameterList() |
| | | this.getInsProductIds() |
| | | // åå§å |
| | | this.clickSidebar(this.clickNodeVal) |
| | | }, |
| | | methods: { |
| | | //åç±» |
| | | handleNotification(cate) { |
| | | this.queryParams.largeCategory = cate |
| | | }, |
| | | obtainItemParameterList() { |
| | | obtainItemParameterList().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.subordinateDepartmentsList = data |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { laboratoryNameIsNull: this.laboratoryNameIsNull, ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | getDeviceParameter({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // å¯¼åº |
| | | handleDownOne() { |
| | | this.outLoading = true |
| | | exportEquipmentDetails().then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设å¤ä»ªå¨ä¸è§è¡¨.doc') |
| | | }) |
| | | }, |
| | | // è·ååå
¸ |
| | | selectEnumByCategory() { |
| | | // 设å¤ç¶æ |
| | | this.getDicts("device_status").then((response) => { |
| | | this.deviceStatusList = this.dictToValue(response.data); |
| | | }); |
| | | // 设å¤åç±» |
| | | this.getDicts("device_type").then((response) => { |
| | | this.equipmentList = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // è·åè´è´£äººå表 |
| | | selectDevicePrincipal() { |
| | | selectUserCondition().then(res => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.responsiblePersonList = data |
| | | this.authorizerList = data |
| | | }) |
| | | }, |
| | | getInsProductIds() { |
| | | getInsProduction().then(res => { |
| | | this.options = res.data.map((m, i) => { |
| | | m.id = m.name; |
| | | let children = m.children.map(n => { |
| | | n.label = n.name; |
| | | n.value = n.id; |
| | | return n |
| | | }) |
| | | return m |
| | | }) |
| | | this.options.forEach(item => { |
| | | if (item.children.length == 0) { |
| | | item.children = null; |
| | | } else { |
| | | item.children.forEach(m => { |
| | | if (m.children.length == 0) { |
| | | m.children = null; |
| | | } else { |
| | | m.children.forEach(n => { |
| | | if (n.children && n.children.length == 0) { |
| | | n.children = null; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.formData = { |
| | | authorizedPerson: [] |
| | | } |
| | | this.formData2 = { |
| | | imageUpload: '', |
| | | imageName: '', |
| | | authorizedPerson: [] |
| | | } |
| | | this.dialogVisible = false; |
| | | this.upLoad = false; |
| | | }, |
| | | handleClose2() { |
| | | this.formData = { |
| | | authorizedPerson: [] |
| | | } |
| | | this.formData2 = { |
| | | imageUpload: '', |
| | | imageName: '', |
| | | authorizedPerson: [] |
| | | } |
| | | this.dialogVisible2 = false; |
| | | this.upLoad = false; |
| | | }, |
| | | selectAllByOne(row) { |
| | | this.isUp = true |
| | | //æå¼å¼¹æ¡ |
| | | this.dialogVisible = true; |
| | | //row = ç¹å»å¯¹åºè¡å¼ |
| | | //å¤å¶ç»formData |
| | | this.formData = this.HaveJson(row); |
| | | console.log(row.insProductIds + 'valll'); |
| | | this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(',') : []; |
| | | }, |
| | | isUpdate(row) { |
| | | //ä¿®æ¹ isUp 为档æ¡ä¿®æ¹ |
| | | this.isUp = false |
| | | //æå¼å¼¹æ¡ |
| | | this.dialogVisible = true; |
| | | //row = ç¹å»å¯¹åºè¡å¼ä¸è¡å¼ |
| | | //å¤å¶ç»formData |
| | | this.formData = this.HaveJson(row); |
| | | if (typeof (row.insProductIds) === 'number') { |
| | | row.insProductIds = row.insProductIds + '' |
| | | } |
| | | this.formData.deviceStatus = this.formData.deviceStatus + '' |
| | | this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(',') : []; |
| | | // å°æ¶é´æ ¼å¼ä¸ºyyyy-MM-dd è¿è¡è½¬æ¢ |
| | | const dateRegex = /^\d{4}-\d{2}-\d{2}$/ |
| | | Object.keys(this.formData).forEach(key => { |
| | | if (dateRegex.test(this.formData[key])) { |
| | | this.formData[key] = `${this.formData[key]} 00:00:00` |
| | | } |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | // ä¸ä¼ å¾çæå |
| | | handleSuccessUpImg(response,) { |
| | | if (response.code == 200) { |
| | | this.formData.imageUpload = response.data.url; |
| | | this.formData.imageName = response.data.name; |
| | | } |
| | | }, |
| | | handleSuccessUpImg2(response) { |
| | | if (response.code == 200) { |
| | | this.$nextTick(() => { |
| | | this.formData.imageUpload = response.data.url; |
| | | this.formData.imageName = response.data.name; |
| | | this.formData2.imageUpload = response.data.url; |
| | | this.formData2.imageName = response.data.name; |
| | | }) |
| | | } |
| | | }, |
| | | submitForm() { |
| | | if (!this.formData.deviceName) { |
| | | this.$message.error('æªè¾å
¥ä»ªå¨åç§°') |
| | | return |
| | | } |
| | | if (!this.formData.enDeviceName) { |
| | | this.$message.error('æªè¾å
¥ä»ªå¨åç§°EN') |
| | | return |
| | | } |
| | | if (!this.formData.specificationModel) { |
| | | this.$message.error('æªè¾å
¥è§æ ¼åå·') |
| | | return |
| | | } |
| | | if (!this.formData.managementNumber) { |
| | | this.$message.error('æªè¾å
¥ç®¡çç¼å·') |
| | | return |
| | | } |
| | | if (!this.formData.activationDate) { |
| | | this.$message.error('æªè¾å
¥æ ¡åæææ') |
| | | return |
| | | } |
| | | if (!this.formData.subordinateDepartmentsId) { |
| | | this.$message.error('æªéæ©æå±é¨é¨') |
| | | return |
| | | } |
| | | if (this.formData.deviceStatus === '' || this.formData.deviceStatus === null) { |
| | | this.$message.error('æªéæ©å½åç¶æ') |
| | | return |
| | | } |
| | | if (!this.formData.calibrationDate) { |
| | | this.$message.error('æªè¾å
¥æ ¡åå¨æï¼æï¼') |
| | | return |
| | | } |
| | | delete this.formData.createTime |
| | | delete this.formData.updateTime |
| | | delete this.formData.createUser |
| | | delete this.formData.updateUser |
| | | const formData = this.HaveJson(this.formData) |
| | | formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : '' |
| | | if (formData.authorizedPerson.length === 0) { |
| | | formData.authorizedPerson = '' |
| | | } else { |
| | | formData.authorizedPerson = JSON.stringify(formData.authorizedPerson) |
| | | } |
| | | this.upLoad = true; |
| | | upDeviceParameter(formData).then(res => { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.upLoad = false |
| | | this.refreshTable('page') |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('ä¿®æ¹å¤±è´¥') |
| | | this.dialogVisible = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¡£æ¡ä¿®è®¢--æ°å¢ |
| | | submitForm2() { |
| | | if (!this.formData2.deviceName) { |
| | | this.$message.error('æªè¾å
¥ä»ªå¨åç§°') |
| | | return |
| | | } |
| | | if (!this.formData2.enDeviceName) { |
| | | this.$message.error('æªè¾å
¥ä»ªå¨åç§°EN') |
| | | return |
| | | } |
| | | if (!this.formData2.specificationModel) { |
| | | this.$message.error('æªè¾å
¥è§æ ¼åå·') |
| | | return |
| | | } |
| | | if (!this.formData2.managementNumber) { |
| | | this.$message.error('æªè¾å
¥ç®¡çç¼å·') |
| | | return |
| | | } |
| | | if (!this.formData2.activationDate) { |
| | | this.$message.error('æªè¾å
¥æ ¡åæææ') |
| | | return |
| | | } |
| | | if (!this.formData2.deviceStatus) { |
| | | this.$message.error('æªéæ©å½åç¶æ') |
| | | return |
| | | } |
| | | if (!this.formData2.calibrationDate) { |
| | | this.$message.error('è¾å
¥æ ¡åå¨æï¼æï¼') |
| | | return |
| | | } |
| | | const formData = this.HaveJson(this.formData2) |
| | | formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : '' |
| | | if (formData.authorizedPerson.length === 0) { |
| | | formData.authorizedPerson = '' |
| | | } else { |
| | | formData.authorizedPerson = JSON.stringify(formData.authorizedPerson) |
| | | } |
| | | this.upLoad2 = true; |
| | | addDeviceParameter(formData).then(res => { |
| | | this.$message.success('æäº¤æå') |
| | | this.upLoad2 = false |
| | | this.refreshTable('page') |
| | | this.dialogVisible2 = false |
| | | this.formData2 = { |
| | | imageUpload: '', |
| | | imageName: '', |
| | | authorizedPerson: [] |
| | | } |
| | | }).catch(e => { |
| | | this.$message.error('æäº¤å¤±è´¥') |
| | | this.dialogVisible2 = false |
| | | this.upLoad2 = false |
| | | }) |
| | | }, |
| | | handleConfig(row) { |
| | | let list = [] |
| | | if (row.insProductItem) { |
| | | list = row.insProductItem.split(';') |
| | | } |
| | | let list2 = [] |
| | | list.map((item) => { |
| | | const obj = Object.assign({ |
| | | deviceId: row.id, |
| | | insProductItem: item, |
| | | }) |
| | | list2.push(obj) |
| | | }) |
| | | this.tableList = list2 |
| | | this.deviceId = row.id |
| | | this.$nextTick(() => { |
| | | this.showData = true |
| | | }) |
| | | }, |
| | | closeDataVue() { |
| | | this.clickSidebar(this.clickNodeVal) |
| | | this.showData = false |
| | | }, |
| | | submitForm3() { |
| | | if (!this.configForm.ip) { |
| | | this.$message.error('请填åIP'); |
| | | return |
| | | } |
| | | if (!this.configForm.collectUrl) { |
| | | this.$message.error('请填åééå°å'); |
| | | return |
| | | } |
| | | if (!this.configForm.storageUrl) { |
| | | this.$message.error('请填åå¨åå°å'); |
| | | return |
| | | } |
| | | if (!this.configForm.refer) { |
| | | this.$message.error('请填ååç
§'); |
| | | return |
| | | } |
| | | if (!this.configForm.x) { |
| | | this.$message.error('请填åX'); |
| | | return |
| | | } |
| | | if (!this.configForm.y) { |
| | | this.$message.error('请填åY'); |
| | | return |
| | | } |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | }, |
| | | }, |
| | | }, |
| | | components: { |
| | | limsTable, |
| | | dataAcquisitionConfig, |
| | | }, |
| | | data() { |
| | | return { |
| | | dateFormat: "yyyy-MM-dd", |
| | | deviceId: "", |
| | | fileTypeOptions: [ |
| | | { label: "csv", value: ".csv" }, |
| | | { label: "db", value: ".db" }, |
| | | { label: "mdb", value: ".mdb" }, |
| | | { label: "word", value: ".docx" }, |
| | | { label: "excel", value: ".xlsx" }, |
| | | { label: "txt", value: ".txt" }, |
| | | { label: "png", value: ".png" }, |
| | | ], |
| | | //æ¯å¦æ¯æ¡£æ¡ä¿®è®¢ true䏿¯ falseæ¯ |
| | | isUp: true, |
| | | formData: { |
| | | authorizedPerson: [], |
| | | }, |
| | | formData2: { |
| | | imageUpload: "", |
| | | imageName: "", |
| | | deviceStatus: "", |
| | | authorizedPerson: [], |
| | | }, |
| | | value: "", |
| | | props: { multiple: true, emitPath: false, value: "id", label: "name" }, |
| | | options: [], |
| | | labelPosition: "right", |
| | | dialogVisible: false, |
| | | dialogVisible2: false, |
| | | addPower: false, |
| | | showData: false, // æ°éé
ç½®é¡µé¢ |
| | | tableList: [], |
| | | addDia: true, |
| | | addPower: true, |
| | | //设å¤ç±»åå表 |
| | | equipmentList: [], |
| | | // è´è´£äººå表 |
| | | responsiblePersonList: [], |
| | | // ææäººå表 |
| | | authorizerList: [], |
| | | // å½åç¶æå表 |
| | | deviceStatusList: [], |
| | | // æå±é¨é¨ |
| | | subordinateDepartmentsList: [], |
| | | upLoad: false, |
| | | upLoad2: false, |
| | | dialogVisible3: false, |
| | | upLoad3: false, |
| | | configForm: {}, |
| | | laboratoryNameIsNull: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { |
| | | label: "设å¤åç§°", |
| | | prop: "deviceName", |
| | | dataType: "link", |
| | | linkEvent: { method: "selectAllByOne", vueComponent: this }, |
| | | }, |
| | | { label: "设å¤åç§°EN", prop: "enDeviceName" }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "specificationModel", |
| | | }, |
| | | { label: "ç产åå®¶", prop: "manufacturer" }, |
| | | { label: "åºåç¼å·", prop: "factoryNo" }, |
| | | { label: "管çç¼å·", prop: "managementNumber" }, |
| | | { label: "ææ¯ææ ", prop: "technicalIndicators" }, |
| | | { label: "è´ç½®æ¥æ", prop: "acquisitionDate" }, |
| | | { label: "å¯ç¨æ¥æ", prop: "activationDate" }, |
| | | { label: "管ç人", prop: "equipmentManagerUser" }, |
| | | { label: "åæ¾ç¹", prop: "storagePoint" }, |
| | | { label: "æå±é¨é¨", prop: "laboratoryName" }, |
| | | { label: "æ£éªé¡¹ç®", prop: "insProductItem" }, |
| | | { label: "æ ¡åæå¡æºæ", prop: "calibrationServices" }, |
| | | { label: "æè¿æ ¡åæ¥æ", prop: "lastCalibrationDateTwo" }, |
| | | { label: "æè¿æ ¸æ¥æ¥æ", prop: "lastCalibrationDate" }, |
| | | { label: "䏿¬¡æ ¡åæ¥æ", prop: "nextCalibrationDateTwo" }, |
| | | { label: "䏿¬¡æ ¸æ¥æ¥æ", prop: "nextCalibrationDate" }, |
| | | { |
| | | label: "设å¤åç±»", |
| | | prop: "largeCategory", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.equipmentList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.equipmentList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "åä»·", prop: "unitPrice" }, |
| | | { |
| | | label: "设å¤ç¶æ", |
| | | prop: "deviceStatus", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.deviceStatusList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.deviceStatusList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "æ ¡å卿(æ)", prop: "calibrationDate" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¡£æ¡ä¿®è®¢", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.isUpdate(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ°éé
ç½®", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleConfig(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.insProductItem == null || row.insProductItem === ""; |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + "/deviceScope/uploadFile"; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.selectEnumByCategory(); |
| | | this.selectDevicePrincipal(); |
| | | this.obtainItemParameterList(); |
| | | this.getInsProductIds(); |
| | | // åå§å |
| | | this.clickSidebar(this.clickNodeVal); |
| | | }, |
| | | methods: { |
| | | //åç±» |
| | | handleNotification(cate) { |
| | | this.queryParams.largeCategory = cate; |
| | | }, |
| | | obtainItemParameterList() { |
| | | obtainItemParameterList().then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.subordinateDepartmentsList = data; |
| | | }); |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull, |
| | | ...this.queryParams, |
| | | ...this.page, |
| | | }; |
| | | delete param.total; |
| | | getDeviceParameter({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // å¯¼åº |
| | | handleDownOne() { |
| | | this.outLoading = true; |
| | | exportEquipmentDetails().then((res) => { |
| | | this.outLoading = false; |
| | | const blob = new Blob([res], { type: "application/octet-stream" }); |
| | | this.$download.saveAs(blob, "设å¤ä»ªå¨ä¸è§è¡¨.doc"); |
| | | }); |
| | | }, |
| | | // è·ååå
¸ |
| | | selectEnumByCategory() { |
| | | // 设å¤ç¶æ |
| | | this.getDicts("device_status").then((response) => { |
| | | this.deviceStatusList = this.dictToValue(response.data); |
| | | }); |
| | | // 设å¤åç±» |
| | | this.getDicts("device_type").then((response) => { |
| | | this.equipmentList = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // è·åè´è´£äººå表 |
| | | selectDevicePrincipal() { |
| | | selectUserCondition().then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.responsiblePersonList = data; |
| | | this.authorizerList = data; |
| | | }); |
| | | }, |
| | | getInsProductIds() { |
| | | getInsProduction().then((res) => { |
| | | this.options = res.data.map((m, i) => { |
| | | m.id = m.name; |
| | | let children = m.children.map((n) => { |
| | | n.label = n.name; |
| | | n.value = n.id; |
| | | return n; |
| | | }); |
| | | return m; |
| | | }); |
| | | this.options.forEach((item) => { |
| | | if (item.children.length == 0) { |
| | | item.children = null; |
| | | } else { |
| | | item.children.forEach((m) => { |
| | | if (m.children.length == 0) { |
| | | m.children = null; |
| | | } else { |
| | | m.children.forEach((n) => { |
| | | if (n.children && n.children.length == 0) { |
| | | n.children = null; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | handleClose() { |
| | | this.formData = { |
| | | authorizedPerson: [], |
| | | }; |
| | | this.formData2 = { |
| | | imageUpload: "", |
| | | imageName: "", |
| | | authorizedPerson: [], |
| | | }; |
| | | this.dialogVisible = false; |
| | | this.upLoad = false; |
| | | }, |
| | | handleClose2() { |
| | | this.formData = { |
| | | authorizedPerson: [], |
| | | }; |
| | | this.formData2 = { |
| | | imageUpload: "", |
| | | imageName: "", |
| | | authorizedPerson: [], |
| | | }; |
| | | this.dialogVisible2 = false; |
| | | this.upLoad = false; |
| | | }, |
| | | selectAllByOne(row) { |
| | | this.isUp = true; |
| | | //æå¼å¼¹æ¡ |
| | | this.dialogVisible = true; |
| | | //row = ç¹å»å¯¹åºè¡å¼ |
| | | //å¤å¶ç»formData |
| | | this.formData = this.HaveJson(row); |
| | | console.log(row.insProductIds + "valll"); |
| | | this.formData.insProductIds = row.insProductIds |
| | | ? row.insProductIds.split(",") |
| | | : []; |
| | | }, |
| | | isUpdate(row) { |
| | | //ä¿®æ¹ isUp 为档æ¡ä¿®æ¹ |
| | | this.isUp = false; |
| | | //æå¼å¼¹æ¡ |
| | | this.dialogVisible = true; |
| | | //row = ç¹å»å¯¹åºè¡å¼ä¸è¡å¼ |
| | | //å¤å¶ç»formData |
| | | this.formData = this.HaveJson(row); |
| | | if (typeof row.insProductIds === "number") { |
| | | row.insProductIds = row.insProductIds + ""; |
| | | } |
| | | this.formData.deviceStatus = this.formData.deviceStatus + ""; |
| | | this.formData.insProductIds = row.insProductIds |
| | | ? row.insProductIds.split(",") |
| | | : []; |
| | | // å°æ¶é´æ ¼å¼ä¸ºyyyy-MM-dd è¿è¡è½¬æ¢ |
| | | const dateRegex = /^\d{4}-\d{2}-\d{2}$/; |
| | | Object.keys(this.formData).forEach((key) => { |
| | | if (dateRegex.test(this.formData[key])) { |
| | | this.formData[key] = `${this.formData[key]} 00:00:00`; |
| | | } |
| | | }); |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error("ä¸ä¼ æä»¶ä¸è¶
è¿10M"); |
| | | this.$refs.upload.clearFiles(); |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error("ä¸ä¼ 失败"); |
| | | this.$refs.upload.clearFiles(); |
| | | }, |
| | | // ä¸ä¼ å¾çæå |
| | | handleSuccessUpImg(response) { |
| | | if (response.code == 200) { |
| | | this.formData.imageUpload = response.data.url; |
| | | this.formData.imageName = response.data.name; |
| | | } |
| | | }, |
| | | handleSuccessUpImg2(response) { |
| | | if (response.code == 200) { |
| | | this.$nextTick(() => { |
| | | this.formData.imageUpload = response.data.url; |
| | | this.formData.imageName = response.data.name; |
| | | this.formData2.imageUpload = response.data.url; |
| | | this.formData2.imageName = response.data.name; |
| | | }); |
| | | } |
| | | }, |
| | | submitForm() { |
| | | if (!this.formData.deviceName) { |
| | | this.$message.error("æªè¾å
¥ä»ªå¨åç§°"); |
| | | return; |
| | | } |
| | | if (!this.formData.enDeviceName) { |
| | | this.$message.error("æªè¾å
¥ä»ªå¨åç§°EN"); |
| | | return; |
| | | } |
| | | if (!this.formData.specificationModel) { |
| | | this.$message.error("æªè¾å
¥è§æ ¼åå·"); |
| | | return; |
| | | } |
| | | if (!this.formData.managementNumber) { |
| | | this.$message.error("æªè¾å
¥ç®¡çç¼å·"); |
| | | return; |
| | | } |
| | | if (!this.formData.activationDate) { |
| | | this.$message.error("æªè¾å
¥æ ¡åæææ"); |
| | | return; |
| | | } |
| | | if (!this.formData.subordinateDepartmentsId) { |
| | | this.$message.error("æªéæ©æå±é¨é¨"); |
| | | return; |
| | | } |
| | | if ( |
| | | this.formData.deviceStatus === "" || |
| | | this.formData.deviceStatus === null |
| | | ) { |
| | | this.$message.error("æªéæ©å½åç¶æ"); |
| | | return; |
| | | } |
| | | if (!this.formData.calibrationDate) { |
| | | this.$message.error("æªè¾å
¥æ ¡åå¨æï¼æï¼"); |
| | | return; |
| | | } |
| | | delete this.formData.createTime; |
| | | delete this.formData.updateTime; |
| | | delete this.formData.createUser; |
| | | delete this.formData.updateUser; |
| | | const formData = this.HaveJson(this.formData); |
| | | formData.insProductIds = formData.insProductIds |
| | | ? formData.insProductIds.join() |
| | | : ""; |
| | | if (formData.authorizedPerson.length === 0) { |
| | | formData.authorizedPerson = ""; |
| | | } else { |
| | | formData.authorizedPerson = JSON.stringify(formData.authorizedPerson); |
| | | } |
| | | this.upLoad = true; |
| | | upDeviceParameter(formData) |
| | | .then((res) => { |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.upLoad = false; |
| | | this.refreshTable("page"); |
| | | this.dialogVisible = false; |
| | | }) |
| | | .catch((e) => { |
| | | this.$message.error("ä¿®æ¹å¤±è´¥"); |
| | | this.dialogVisible = false; |
| | | this.upLoad = false; |
| | | }); |
| | | }, |
| | | // æäº¤æ¡£æ¡ä¿®è®¢--æ°å¢ |
| | | submitForm2() { |
| | | if (!this.formData2.deviceName) { |
| | | this.$message.error("æªè¾å
¥ä»ªå¨åç§°"); |
| | | return; |
| | | } |
| | | if (!this.formData2.enDeviceName) { |
| | | this.$message.error("æªè¾å
¥ä»ªå¨åç§°EN"); |
| | | return; |
| | | } |
| | | if (!this.formData2.specificationModel) { |
| | | this.$message.error("æªè¾å
¥è§æ ¼åå·"); |
| | | return; |
| | | } |
| | | if (!this.formData2.managementNumber) { |
| | | this.$message.error("æªè¾å
¥ç®¡çç¼å·"); |
| | | return; |
| | | } |
| | | if (!this.formData2.activationDate) { |
| | | this.$message.error("æªè¾å
¥æ ¡åæææ"); |
| | | return; |
| | | } |
| | | if (!this.formData2.deviceStatus) { |
| | | this.$message.error("æªéæ©å½åç¶æ"); |
| | | return; |
| | | } |
| | | if (!this.formData2.calibrationDate) { |
| | | this.$message.error("è¾å
¥æ ¡åå¨æï¼æï¼"); |
| | | return; |
| | | } |
| | | const formData = this.HaveJson(this.formData2); |
| | | formData.insProductIds = formData.insProductIds |
| | | ? formData.insProductIds.join() |
| | | : ""; |
| | | if (formData.authorizedPerson.length === 0) { |
| | | formData.authorizedPerson = ""; |
| | | } else { |
| | | formData.authorizedPerson = JSON.stringify(formData.authorizedPerson); |
| | | } |
| | | this.upLoad2 = true; |
| | | addDeviceParameter(formData) |
| | | .then((res) => { |
| | | this.$message.success("æäº¤æå"); |
| | | this.upLoad2 = false; |
| | | this.refreshTable("page"); |
| | | this.dialogVisible2 = false; |
| | | this.formData2 = { |
| | | imageUpload: "", |
| | | imageName: "", |
| | | authorizedPerson: [], |
| | | }; |
| | | }) |
| | | .catch((e) => { |
| | | this.$message.error("æäº¤å¤±è´¥"); |
| | | this.dialogVisible2 = false; |
| | | this.upLoad2 = false; |
| | | }); |
| | | }, |
| | | handleConfig(row) { |
| | | let list = []; |
| | | if (row.insProductItem) { |
| | | list = row.insProductItem.split(";"); |
| | | } |
| | | let list2 = []; |
| | | list.map((item) => { |
| | | const obj = Object.assign({ |
| | | deviceId: row.id, |
| | | insProductItem: item, |
| | | }); |
| | | list2.push(obj); |
| | | }); |
| | | this.tableList = list2; |
| | | this.deviceId = row.id; |
| | | this.$nextTick(() => { |
| | | this.showData = true; |
| | | }); |
| | | }, |
| | | closeDataVue() { |
| | | this.clickSidebar(this.clickNodeVal); |
| | | this.showData = false; |
| | | }, |
| | | submitForm3() { |
| | | if (!this.configForm.ip) { |
| | | this.$message.error("请填åIP"); |
| | | return; |
| | | } |
| | | if (!this.configForm.collectUrl) { |
| | | this.$message.error("请填åééå°å"); |
| | | return; |
| | | } |
| | | if (!this.configForm.storageUrl) { |
| | | this.$message.error("请填åå¨åå°å"); |
| | | return; |
| | | } |
| | | if (!this.configForm.refer) { |
| | | this.$message.error("请填ååç
§"); |
| | | return; |
| | | } |
| | | if (!this.configForm.x) { |
| | | this.$message.error("请填åX"); |
| | | return; |
| | | } |
| | | if (!this.configForm.y) { |
| | | this.$message.error("请填åY"); |
| | | return; |
| | | } |
| | | |
| | | this.upLoad3 = true |
| | | numberCollect(this.configForm).then(res => { |
| | | this.upLoad3 = false |
| | | this.$message.success('æä½æå') |
| | | this.refreshTable('page') |
| | | this.dialogVisible3 = false |
| | | }).catch(e => { |
| | | this.$message.error('æä½å¤±è´¥') |
| | | this.dialogVisible3 = false |
| | | this.upLoad3 = false |
| | | }) |
| | | }, |
| | | // ç¹å»ä¾§è¾¹æ å·æ° |
| | | clickSidebar(clickNodeVal) { |
| | | this.laboratoryNameIsNull = false |
| | | // æ¯å¦åå¨valueï¼åå¨value代表为ä¸çº§ |
| | | if (!clickNodeVal.value) { |
| | | this.list = []; |
| | | this.queryParams.laboratoryName = null |
| | | this.queryParams.storagePoint = null |
| | | // çäº1代表为æ çä¸çº§ï¼label为é¨é¨ |
| | | if (clickNodeVal.label == 'å
¶ä»') { |
| | | this.laboratoryNameIsNull = true |
| | | this.refreshTable('page') |
| | | return |
| | | } |
| | | if (clickNodeVal.level == 1) { |
| | | this.queryParams.laboratoryName = clickNodeVal.label |
| | | // çäºäºçº§ãlabel为åå¨å°ç¹ |
| | | } else if (clickNodeVal.level == 2) { |
| | | // å
¶ä»è¡¨ç¤ºæ²¡æé
ç½®å®éªå®¤ï¼åªé
ç½®äºå°ç¹ |
| | | if (clickNodeVal.parent.label == 'å
¶ä»') { |
| | | this.laboratoryNameIsNull = true |
| | | } else { |
| | | this.queryParams.laboratoryName = clickNodeVal.parent.label |
| | | } |
| | | this.queryParams.storagePoint = clickNodeVal.label |
| | | } |
| | | this.refreshTable('page') |
| | | } |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delDeviceParameter({ id: row.id }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | this.clickSidebar(newVal) |
| | | } |
| | | } |
| | | } |
| | | this.upLoad3 = true; |
| | | numberCollect(this.configForm) |
| | | .then((res) => { |
| | | this.upLoad3 = false; |
| | | this.$message.success("æä½æå"); |
| | | this.refreshTable("page"); |
| | | this.dialogVisible3 = false; |
| | | }) |
| | | .catch((e) => { |
| | | this.$message.error("æä½å¤±è´¥"); |
| | | this.dialogVisible3 = false; |
| | | this.upLoad3 = false; |
| | | }); |
| | | }, |
| | | // ç¹å»ä¾§è¾¹æ å·æ° |
| | | clickSidebar(clickNodeVal) { |
| | | this.laboratoryNameIsNull = false; |
| | | // æ¯å¦åå¨valueï¼åå¨value代表为ä¸çº§ |
| | | if (!clickNodeVal.value) { |
| | | this.list = []; |
| | | this.queryParams.laboratoryName = null; |
| | | this.queryParams.storagePoint = null; |
| | | // çäº1代表为æ çä¸çº§ï¼label为é¨é¨ |
| | | if (clickNodeVal.label == "å
¶ä»") { |
| | | this.laboratoryNameIsNull = true; |
| | | this.refreshTable("page"); |
| | | return; |
| | | } |
| | | if (clickNodeVal.level == 1) { |
| | | this.queryParams.laboratoryName = clickNodeVal.label; |
| | | // çäºäºçº§ãlabel为åå¨å°ç¹ |
| | | } else if (clickNodeVal.level == 2) { |
| | | // å
¶ä»è¡¨ç¤ºæ²¡æé
ç½®å®éªå®¤ï¼åªé
ç½®äºå°ç¹ |
| | | if (clickNodeVal.parent.label == "å
¶ä»") { |
| | | this.laboratoryNameIsNull = true; |
| | | } else { |
| | | this.queryParams.laboratoryName = clickNodeVal.parent.label; |
| | | } |
| | | this.queryParams.storagePoint = clickNodeVal.label; |
| | | } |
| | | this.refreshTable("page"); |
| | | } |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delDeviceParameter({ id: row.id }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | this.clickSidebar(newVal); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .role_manage { |
| | | width: 100%; |
| | | height: 100%; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .title { |
| | | line-height: 15px; |
| | | line-height: 15px; |
| | | } |
| | | |
| | | .search { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 14em; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 14em; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 80px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | width: 80px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 80px); |
| | | width: calc(100% - 80px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 12px; |
| | | background-color: #fff; |
| | | height: calc(100vh - 17em); |
| | | margin-top: 12px; |
| | | background-color: #fff; |
| | | height: calc(100vh - 17em); |
| | | } |
| | | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .picName { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | word-break: break-all; |
| | | width: 120px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | word-break: break-all; |
| | | width: 120px; |
| | | } |
| | | </style> |
| | |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downloadFile(scope.row.fileSystemName)">ä¸è½½</el-button> |
| | | <el-button type="text" size="small" style="color: red;" |
| | | @click="deleteHomeworkGuidebook(scope.row)">å é¤</el-button> |
| | | <el-button type="text" size="small" @click="instructionEditFun(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="approval(scope.row)">审æ¹</el-button> |
| | | @click="deleteHomeworkGuidebook(scope.row)" :disabled="scope.row.status === true">å é¤</el-button> |
| | | <el-button type="text" size="small" @click="instructionEditFun(scope.row)" :disabled="scope.row.status === true">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="approval(scope.row)" :disabled="scope.row.status === true">审æ¹</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }); |
| | | }, |
| | | downloadFile(fileName) { |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(fileName) |
| | | if (state) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url, fileName) |
| | | } else { |
| | | const url = this.javaApi + '/word/' + fileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = fileName; |
| | | link.click(); |
| | | this.$message.success('ä¸è½½æå') |
| | | } |
| | | this.$download.saveAs(fileName, fileName) |
| | | }, |
| | | instructionEditFun(row) { |
| | | this.dialogVisible = true |
| | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <el-row class="title"> |
| | | <el-col :span="8" style="text-align: left;">é¢å®æ»è§</el-col> |
| | | <el-col :span="16" style="text-align: right;padding-bottom:10px"> |
| | | <el-col :span="24" style="text-align: right;padding:10px 0"> |
| | | <el-date-picker |
| | | v-model="startTime" |
| | | format="yyyy-MM-dd" |
| | |
| | | size="mini" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"/> |
| | | <el-button size="mini" type="primary" @click="ValidateAndQuery">æ¥ è¯¢</el-button> |
| | | <el-button size="mini" type="primary" @click="ValidateAndQuery" style="margin-left: 10px">æ¥ è¯¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="table-container"> |
| | |
| | | } |
| | | }, |
| | | data() { |
| | | |
| | | return { |
| | | timeSlots: ['09:00-12:00', '13:00-18:00', '18:00-22:00'], |
| | | dates: [], |
| | |
| | | startTime: '', |
| | | endTime: '', |
| | | entity: { |
| | | deviceName: null, |
| | | laboratoryName: '', |
| | | storagePoint: '', |
| | | }, |
| | |
| | | reservationSpecification: '' |
| | | }, |
| | | total: '', |
| | | componentData: { |
| | | entity: { |
| | | largeCategory: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | }, |
| | | yuyue: null, |
| | | yuyuetime: '', |
| | | rules: { |
| | |
| | | this.clickSidebar(newVal) |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.clickSidebar(this.clickNodeVal) |
| | | this.initDate(); |
| | | }, |
| | | mounted() { |
| | | this.getStartTimeAndEndTime(); |
| | | |
| | | // this.getStartTimeAndEndTime(); |
| | | }, |
| | | methods: { |
| | | isBeforeDate() { |
| | |
| | | const appointment = this.appointment && this.appointment.split('-') |
| | | let appointment0 = '' |
| | | let appointment1 = '' |
| | | if (appointment !== '') { |
| | | if (appointment) { |
| | | appointment0 = appointment[0].slice(0, 2) |
| | | appointment1 = appointment[1].slice(0, 2) |
| | | } |
| | |
| | | if (!row || row.dateList === null || row.dateList === undefined || row.dateList === "") { |
| | | return 'é¢çº¦'; |
| | | } |
| | | var dateLst = row.dateList |
| | | const dateLst = row.dateList |
| | | for (const dateLstElement of dateLst) { |
| | | if (dateLstElement.date === date) { |
| | | if (dateLstElement.value === 0) { |
| | |
| | | getStartTimeAndEndTime() { |
| | | //æ¥è¯¢é»è¾ |
| | | this.tableLoading = true; |
| | | reservationSelectDevice({ |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.entity, |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull |
| | | }).then(res => { |
| | | const params = { |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | starttime: this.startTime, |
| | | endtime: this.endTime, |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull, |
| | | laboratoryName: this.entity.laboratoryName, |
| | | storagePoint: this.entity.storagePoint, |
| | | } |
| | | reservationSelectDevice(params).then(res => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data; |
| | |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | // æå¼é¢çº¦å¼¹æ¡ |
| | | openModal(date, row) { |
| | | console.log('date', date); |
| | | console.log('row', row); |
| | | this.yuyue = row; |
| | | this.yuyuetime = date; |
| | | this.appointment = row.time |
| | | this.showModal = true; |
| | | this.getList(); |
| | | }, |
| | | // æå¼æ°å»ºé¢å®å¼¹æ¡ |
| | | openAdd() { |
| | | this.addVisiable = true; |
| | | this.addReservation.deviceId = this.yuyue.id; |
| | | // this.addReservation.deviceNumber = this.yuyue.deviceNumber; |
| | | this.addReservation.deviceName = this.yuyue.deviceName; |
| | | this.addReservation.reservationTime = this.yuyuetime + " " + this.yuyue.time; |
| | | this.addReservation.specificTime = this.yuyue.time; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // é¢å®ä¿¡æ¯æ¥è¯¢ |
| | | getList() { |
| | | const params = { |
| | | selectReservationParameterPage: this.yuyue.id, |
| | | deviceId: this.yuyue.id, |
| | | reservationTime: this.yuyuetime, |
| | | specificTime: this.yuyue.time, |
| | | } |
| | |
| | | <div v-if="!isShowAll" style="height: 100%;"> |
| | | <el-tabs v-model="tabListActiveName" class="main_right" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="设å¤è¿è¡æ»è§" name="设å¤è¿è¡æ»è§"> |
| | | <operationOverview v-if="tabListActiveName == '设å¤è¿è¡æ»è§'" :clickNodeVal="clickNodeVal"/> |
| | | <operationOverview view v-if="tabListActiveName == '设å¤è¿è¡æ»è§'" :clickNodeVal="clickNodeVal"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="è®¾å¤æ¡£æ¡" name="è®¾å¤æ¡£æ¡"> |
| | | <files v-if="tabListActiveName == 'è®¾å¤æ¡£æ¡'" :clickNodeVal="clickNodeVal" /> |
| | |
| | | isShowAll: true, |
| | | deviceName: "", // ä¾§è¾¹æ æç´¢ |
| | | loading: false, |
| | | tabListActiveName: 'è®¾å¤æ¡£æ¡', |
| | | tabListActiveName: '设å¤è¿è¡æ»è§', |
| | | menuListActiveName: 'è®¾å¤æ»è§', |
| | | list: [], |
| | | clickNodeVal: {} |
| | |
| | | .device-right { |
| | | background: #fff; |
| | | width: calc(100% - 250px); |
| | | height: calc(100vh - 100px); |
| | | height: calc(100vh - 40px); |
| | | border-radius: 16px; |
| | | box-sizing: border-box; |
| | | padding: 10px; |
| | |
| | | v-show="active == 3 && addObj.companyId" |
| | | >éè¿</el-button |
| | | > |
| | | <el-button size="medium" @click="$parent.playOrder(0)"> |
| | | <el-button size="medium" @click="$router.go(-1)"> |
| | | <span style="color: #3a7bfa">è¿å</span> |
| | | </el-button> |
| | | </el-col> |
| | |
| | | placeholder="请è¾å
¥" |
| | | class="search_input" |
| | | clearable |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | v-model="addObj.phone" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¥ååéæ¹å¼ï¼" prop="send"> |
| | | <el-radio-group v-model="addObj.send"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active > 1"> |
| | | <el-radio :label="1">èªå</el-radio> |
| | | <el-radio :label="0">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | |
| | | prop="processing" |
| | | class="processing_input" |
| | | > |
| | | <el-radio-group v-model="addObj.processing" size="mini"> |
| | | <el-radio-group |
| | | v-model="addObj.processing" |
| | | :disabled="active > 1" |
| | | size="mini" |
| | | > |
| | | <el-radio :label="0">å§æåä½åå</el-radio> |
| | | <el-radio :label="1">å®éªå®¤å¤ç</el-radio> |
| | | </el-radio-group> |
| | |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | clearable |
| | | v-model="addObj.engineering" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | clearable |
| | | v-model="addObj.engineeringEn" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="addObj.production" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="addObj.productionEn" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¯å¦çæ ·ï¼" prop="isLeave"> |
| | | <el-radio-group v-model="addObj.isLeave"> |
| | | <el-radio-group v-model="addObj.isLeave" :disabled="active > 1"> |
| | | <el-radio :label="0">ä¸çæ ·</el-radio> |
| | | <el-radio :label="1">çæ ·</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¯å¦æ¶åé
奿 ·åï¼" prop="mating"> |
| | | <el-radio-group |
| | | :disabled="active > 1" |
| | | v-model="addObj.mating" |
| | | @change="$refs.sampleTable.doLayout()" |
| | | > |
| | |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | clearable |
| | | v-model="addObj.otcCode" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | clearable |
| | | v-model="addObj.prepareUser" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | clearable |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | v-model="addObj.remark" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form> |
| | | </div> |
| | | </basic-container> |
| | | <div |
| | | class="search" |
| | | v-if="active == 1" |
| | | style="display: flex; background: transparent" |
| | | > |
| | | <div style="display: flex; align-items: center"> |
| | | <div class="search_label">æ ·ååå·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="model" |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | size="small" |
| | | @change="changeModel" |
| | | > |
| | | <el-option |
| | | v-for="item in models" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex; align-items: center"> |
| | | <div class="search_label">æ£éªæ åï¼</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | filterable |
| | | v-model="standardMethodListId" |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | size="small" |
| | | @focus="methodFocus" |
| | | :loading="methodLoad" |
| | | @change="changeStandardMethodListId" |
| | | > |
| | | <el-option |
| | | v-for="item in methods" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <basic-container> |
| | | <div style="height: auto"> |
| | | <div |
| | | class="search" |
| | | v-if="active == 1" |
| | | style="display: flex; background: transparent" |
| | | > |
| | | <div> |
| | | <div class="search_label">æ ·ååå·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="model" |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | size="small" |
| | | @change="changeModel" |
| | | > |
| | | <el-option |
| | | v-for="item in models" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="search_label">æ£éªæ åï¼</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | filterable |
| | | v-model="standardMethodListId" |
| | | :placeholder="active > 1 ? '' : '请è¾å
¥'" |
| | | size="small" |
| | | @focus="methodFocus" |
| | | :loading="methodLoad" |
| | | @change="changeStandardMethodListId" |
| | | > |
| | | <el-option |
| | | v-for="item in methods" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | class="el-table sampleTable" |
| | | ref="sampleTable" |
| | |
| | | </el-table> |
| | | </div> |
| | | </basic-container> |
| | | <el-dialog |
| | | title="éæ©æ ·å" |
| | | :visible.sync="selectStandardTree" |
| | | width="500px" |
| | | > |
| | | <div |
| | | class="body" |
| | | style="height: 60vh; overflow-y: auto; user-select: none" |
| | | v-if="selectStandardTree" |
| | | > |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-input |
| | | placeholder="è¾å
¥å
³é®åè¿è¡æç´¢" |
| | | suffix-icon="el-icon-search" |
| | | v-model="search" |
| | | size="small" |
| | | style="margin-bottom: 5px" |
| | | clearable |
| | | @blur="searchFilter" |
| | | @clear="searchFilter" |
| | | @keyup.enter.native="searchFilter" |
| | | ></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree |
| | | :data="list" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'label' }" |
| | | node-key="label" |
| | | :filter-node-method="filterNode" |
| | | @node-click="handleNodeClick" |
| | | highlight-current |
| | | @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" |
| | | :default-expanded-keys="expandedKeys" |
| | | @dblclick.native="activeStandardTree" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <span |
| | | ><i |
| | | :class="`node_i ${ |
| | | data.children != undefined |
| | | ? data.code === '[1]' |
| | | ? 'el-icon-folder-opened' |
| | | : 'el-icon-folder' |
| | | : 'el-icon-tickets' |
| | | }`" |
| | | ></i> |
| | | {{ data.code }} {{ data.label }}</span |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectStandardTree = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="activeStandardTree">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="éæ©åä½" :visible.sync="selectUserDia" width="70%"> |
| | | <div class="body" style="height: 60vh" v-if="selectUserDia"> |
| | | <ValueTable |
| | | ref="ValueTable2" |
| | | :url="$api.user.selectCustomPageList" |
| | | :componentData="componentData2" |
| | | /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectUserDia = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="selectUser">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="ä¿å模æ¿" :visible.sync="templateDia" width="400px"> |
| | | <div |
| | | class="body" |
| | | style="display: flex; align-items: center" |
| | | v-if="templateDia" |
| | | > |
| | | <div class="search_label" style="width: 90px"> |
| | | <span class="required-span">* </span>模æ¿åç§°ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable v-model="templateName"></el-input> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="templateDia = false">å æ¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="addTemplateDia" |
| | | :loading="templateLoading" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="æ£éªä¸å" |
| | | :visible.sync="issuedDialogVisible" |
| | | width="400px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :show-close="false" |
| | | > |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>çº¦å®æ¶é´ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | size="small" |
| | | v-model="distributeData.appointed" |
| | | :picker-options="pickerOptions" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span" v-if="addObj.type == 2">* </span |
| | | >ææ´¾äººåï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | multiple |
| | | v-model="distributeData.userId" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | filterable |
| | | style="width: 100%" |
| | | @change="changeUser" |
| | | > |
| | | <el-option-group |
| | | v-for="(item, index) in Object.keys(personList)" |
| | | :key="index" |
| | | :label="item" |
| | | > |
| | | <el-option |
| | | v-for="op in personList[item]" |
| | | :key="op.id" |
| | | :label="op.name" |
| | | :value="op.id" |
| | | > |
| | | </el-option> |
| | | </el-option-group> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="22" |
| | | v-if="distributeData.userId.length > 0" |
| | | > |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>è¯éªå®¤ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="distributeData.sonLaboratory" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in sonLaboratoryList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>åå»ºå§æåï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="distributeData.isCreate" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æ¯" :value="true"></el-option> |
| | | <el-option label="å¦" :value="false"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="issuedDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="ä¸éè¿åå " :visible.sync="noDialogVisible" width="400px"> |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>ä¸éè¿åå ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="tell" |
| | | size="small" |
| | | placeholder="请è¾å
¥ä¸éè¿åå " |
| | | ></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="(noDialogVisible = false), (tell = '')" |
| | | >å æ¶</el-button |
| | | > |
| | | <el-button type="primary" @click="submitTell" :loading="noLoading" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <fiberOpticConfig |
| | | :fiberPairing="fiberPairing" |
| | | :currentId="currentId" |
| | | @saveFiberopticConfig="saveFiberConfigEvent($event)" |
| | | v-if="configShow && examine == 0" |
| | | :active="active" |
| | | :inspectionItemST="inspectionItemST" |
| | | /> |
| | | <fiberOpticConfigTwo |
| | | :currentId="currentId" |
| | | v-if="configShow && examine == 1" |
| | | :active="active" |
| | | /> |
| | | <equipConfig |
| | | :currentId="currentId" |
| | | v-if="equipConfigShow" |
| | | :active="active" |
| | | /> |
| | | <cableConfig v-if="cableConfigShow" :active="active" /> |
| | | <!-- åéç¹æ®å¼å¤çæ¡--> |
| | | <el-dialog |
| | | title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" |
| | | :visible.sync="bsm1Dia" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | 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="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="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" |
| | | :label="a" |
| | | >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="bsm2"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label" style="width: 220px"> |
| | | <span class="required-span">* </span>æ ·åçæ¥é
对æ°éï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input-number |
| | | size="medium" |
| | | v-model="bsm2Val" |
| | | :min="1" |
| | | :max="bsm2Val3.length" |
| | | :precision="0" |
| | | style="width: 70%" |
| | | :controls="false" |
| | | @change="bsm2Up" |
| | | ></el-input-number> |
| | | <span>MAXï¼{{ bsm2Val3.length }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col style="margin-top: 6px"> |
| | | <el-col v-for="(a, ai) in bsm2Val2" :key="ai"> |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[0]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col |
| | | :span="4" |
| | | class="pairing" |
| | | style="border: 0; color: rgba(0, 0, 0, 0.2)" |
| | | >ââ</el-col |
| | | > |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[1]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button type="primary" @click="save2" :loading="saveLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å
¨éç¹æ®å¼å¤çæ¡--> |
| | | <el-dialog |
| | | title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" |
| | | :visible.sync="bsm1DiaAll" |
| | | min-width="400px" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="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="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="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" |
| | | :label="a" |
| | | >{{ JSON.parse(item.bsmRow.ask)[ai] }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="item.bsm2"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label" style="width: 220px"> |
| | | <span class="required-span">* </span>æ ·åçæ¥é
对æ°éï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input-number |
| | | size="medium" |
| | | v-model="item.bsm2Val" |
| | | :min="1" |
| | | :max="item.bsm2Val3.length" |
| | | :precision="0" |
| | | style="width: 70%" |
| | | :controls="false" |
| | | @change="bsm2Up" |
| | | ></el-input-number> |
| | | <span>MAXï¼{{ item.bsm2Val3.length }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col style="margin-top: 6px"> |
| | | <el-col v-for="(a, ai) in item.bsm2Val2" :key="ai"> |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[0]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in item.sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col |
| | | :span="4" |
| | | class="pairing" |
| | | style="border: 0; color: rgba(0, 0, 0, 0.2)" |
| | | >ââ</el-col |
| | | > |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[1]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in item.sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button type="primary" @click="save1" :loading="saveLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="ç¹æ®å¼å¡«å" |
| | | :visible.sync="bsm3Dia" |
| | | top="5vh" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | width="800px" |
| | | :show-close="false" |
| | | > |
| | | <el-table :data="editTable" style="width: 100%" height="500px"> |
| | | <!-- inspectionItemList --> |
| | | <el-table-column prop="inspectionItemList" label="æ£éªé¡¹" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleCode" label="æ ·åç¼å·" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="æ ·ååå·" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="symbolItem" label="è¯å«ç¬¦å·"> </el-table-column> |
| | | <el-table-column prop="value" label="è¯å«ç¬¦å¼"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.value" |
| | | placeholder="请è¾å
¥" |
| | | @input="inputValueHandler(scope.row, scope.$index)" |
| | | size="small" |
| | | type="number" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="bsm3Dia = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="save0" :loading="saveLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="温度循ç¯è¦æ±å¡«å" |
| | | :visible.sync="circulateShow" |
| | | width="900px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :before-close="beforeCirculateShowClose" |
| | | :show-close="false" |
| | | > |
| | | <div class="search" style="display: flex; background: transparent"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿æ¸©æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="circulateForm.entrustTime" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¾ªç¯æ¬¡æ°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="circulateForm.entrustNum" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">温度ç¹ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | @focus="() => (isFocus = true)" |
| | | @blur="changeTemperatureData" |
| | | v-model="circulateForm.entrustPoint" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="circulateTable"> |
| | | <div class="opticalProject"> |
| | | <div style="line-height: 30px">å
纤项ç®</div> |
| | | <el-divider></el-divider> |
| | | <div> |
| | | <el-table |
| | | ref="multipleTable" |
| | | border |
| | | :header-cell-style="{ 'text-align': 'center' }" |
| | | :cell-style="{ 'text-align': 'center' }" |
| | | :data="opticalProject" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @row-click="rowClickOptical" |
| | | @select="selectOpticalProject" |
| | | @select-all="selectAllOptical" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | prop="value" |
| | | label="å
纤项ç®" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="temperatureList"> |
| | | <div class="temperatureListTitle"> |
| | | <span>温度ç¹éå</span> |
| | | <span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | :disabled="isFocus" |
| | | @click="addTemperatureData" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button size="mini" @click="deleteTemperatureData" |
| | | >å é¤</el-button |
| | | > |
| | | </span> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <el-table |
| | | :data="temperatureData" |
| | | border |
| | | :header-cell-style="{ 'text-align': 'center' }" |
| | | :cell-style="{ 'text-align': 'center' }" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column prop="date" label="温度ç¹(â)" width="120px"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.temperaturePoint" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | @change="changeTemperature" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="è¦æ±(dB/Km)"> |
| | | <template slot-scope="scope"> |
| | | <span>x</span> |
| | | <el-select |
| | | v-model="scope.row.askSymbol" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 120px" |
| | | @change="changeTemperature" |
| | | > |
| | | <el-option |
| | | v-for="item in temperatureDataList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.askNum" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | style="width: 120px" |
| | | @change="changeTemperature" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanSpliceData">åæ¶</el-button> |
| | | <el-button type="primary" @click="spliceData">ä¿å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- çµåè¯éªå®¤---温åè¯éª/çå¾ªç¯ --> |
| | | <el-dialog |
| | | :title="temperatureTitle" |
| | | :visible.sync="temperatureShow" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | width="260px" |
| | | :before-close="temperatureShowClose" |
| | | :show-close="false" |
| | | > |
| | | <div> |
| | | <div v-if="isShowInput" style="margin-bottom: 6px"> |
| | | <span>å¾ªç¯æ¬¡æ°:</span> |
| | | <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> --> |
| | | <el-input-number |
| | | v-model="temperatureTestNum" |
| | | :min="2" |
| | | :max="1000000" |
| | | size="small" |
| | | label="" |
| | | ></el-input-number> |
| | | </div> |
| | | <el-checkbox-group |
| | | v-model="temperatureTest" |
| | | @change="handleTemperatureTestChange" |
| | | style="display: flex; flex-direction: column" |
| | | > |
| | | <el-checkbox |
| | | v-for="item in temperatureList" |
| | | :label="item" |
| | | :key="item" |
| | | style="margin-bottom: 6px" |
| | | >{{ item }}</el-checkbox |
| | | > |
| | | </el-checkbox-group> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanTemperatureTest">åæ¶</el-button> |
| | | <el-button type="primary" @click="spliceTemperatureTest" |
| | | >ä¿å</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | selectInsOrderTemplate, |
| | | hasSendUrgentOrder, |
| | | addInsOrder, |
| | | selectOrderManDay, |
| | | selectInsOrderTemplateById, |
| | | upInsOrderOfState, |
| | | upInsOrder, |
| | | getInsOrder, |
| | | addInsOrderTemplate, |
| | | delInsOrderTemplate, |
| | | labelPrinting, |
| | | } from "@/api/business/inspectionOrder"; |
| | | import { |
| | | selectStandardTreeList2, |
| | | selectStandardMethodEnum, |
| | | selectsStandardMethodByFLSSM, |
| | | selectStandardProductList, |
| | | } from "@/api/standard/standardLibrary"; |
| | | import { selectBushingBySampleId } from "@/api/business/insBushing"; |
| | | import { getLaboratoryPersonList } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | import fiberOpticConfig from "./fiberoptic-config.vue"; |
| | | import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue"; |
| | |
| | | cableConfig, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName", "company"]), |
| | | ...mapGetters(["nickName", "loginUserInfo"]), |
| | | }, |
| | | props: { |
| | | examine: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | active: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | currentId: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | isReview: false, //æ¯å¦æ¯æ¥ç详æ
|
| | | examine: 0, |
| | | active: 0, |
| | | currentId: 0, |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | // å½åæ¶é´å ä¸ä¸å¤©çæ¶é´æ³ |
| | |
| | | this.standardMethodListId = null; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.active = this.$route.query.active; |
| | | this.currentId = this.$route.query.currentId; |
| | | this.examine = this.$route.query.examine; |
| | | this.isReview = this.$route.query.isReview; |
| | | }, |
| | | mounted() { |
| | | if (this.addObj.custom == "" || this.addObj.custom == null) { |
| | | this.addObj.custom = this.nickName; //设置å¶å人为å½åç»å½äºº |
| | | } |
| | | this.addObj.company = this.company; |
| | | //æ¥è¯¢åå
¸ |
| | | this.selectDictForType(); |
| | | this.selectDictForOrderType(); |
| | | this.selectDictForUnit(); |
| | | this.selectDictForSampleForm(); |
| | | |
| | | if (this.active != 3) { |
| | | this.getUserNow(); |
| | | this.init(); |
| | | } |
| | | this.selectStandardTreeList(); |
| | | this.getAuthorizedPerson(); |
| | |
| | | if (this.active != 1) { |
| | | // æ¥ç/å®¡æ ¸æµç¨ |
| | | // è¯·æ±æ¥å£ï¼åæ¾æ°æ® |
| | | this.$axios |
| | | .post(this.$api.insOrder.getInsOrder, { |
| | | orderId: this.currentId, |
| | | }) |
| | | getInsOrder({ |
| | | orderId: this.currentId, |
| | | }) |
| | | .then((res) => { |
| | | this.addObj = { |
| | | ...res.data.insOrder, |
| | | }; |
| | | this.addObj.type = String(this.addObj.type); |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.getProNum(); |
| | | this.addObj.sampleNum = this.sampleList.length; |
| | | this.$nextTick(() => { |
| | | this.$refs.sampleTable.doLayout(); |
| | | if (this.addObj.sampleNum > 0) { |
| | | this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true); |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | this.addObj = { |
| | | ...res.data.insOrder, |
| | | }; |
| | | this.addObj.type = String(this.addObj.type); |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.getProNum(); |
| | | this.addObj.sampleNum = this.sampleList.length; |
| | | this.$nextTick(() => { |
| | | this.$refs.sampleTable.doLayout(); |
| | | if (this.addObj.sampleNum > 0) { |
| | | this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true); |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | let flag = true; |
| | | //妿æ¯ç±»åæ¯ç´§æ¥ï¼å¤æå½å客æ·å½å¤©çç´§æ¥é¢åº¦æ¯å¦ç¨å® |
| | | if (type == 2) { |
| | | await this.$axios |
| | | .post(this.$api.insOrder.hasSendUrgentOrder, {}) |
| | | await hasSendUrgentOrder() |
| | | .then((res) => { |
| | | flag = res.data; |
| | | return flag; |
| | | // if (!res.data) { |
| | | // this.addObj.type = "1"; |
| | | // this.$message.error("å½å¤©ç´§æ¥é¢åº¦å·²ç¨å®"); |
| | | // throw "å½å¤©ç´§æ¥é¢åº¦å·²ç¨å®"; |
| | | // } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | return flag; |
| | |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => { |
| | | this.personList = res.data; |
| | | }); |
| | | getLaboratoryPersonList() |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.personList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectDictForType() { |
| | | getDicts("urgency_level") |
| | |
| | | let sampleList = this.HaveJson(sampleList0); |
| | | sampleList.forEach((a) => { |
| | | a.insProduct.forEach((b) => { |
| | | b.id = null; |
| | | delete b.bsmRow; |
| | | }); |
| | | }); |
| | |
| | | console.log(this.sampleList); |
| | | console.log(this.fiberPairing); |
| | | this.saveLoad = true; |
| | | this.$axios |
| | | .post(this.$api.insOrder.addInsOrder, { |
| | | str: JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify( |
| | | sampleList.map((a) => { |
| | | if (this.PROJECT === "è£
å¤çµç¼") { |
| | | if (a.modelNum) { |
| | | const index = a.modelNum.indexOf("Ã"); |
| | | if (index === 0) { |
| | | a.model = a.model + a.modelNum; |
| | | } else if (index === -1) { |
| | | a.model = a.model + "-" + a.modelNum; |
| | | } else { |
| | | a.model = a.modelNum + a.model; |
| | | } |
| | | } else { |
| | | a.model = |
| | | a.model + |
| | | (a.modelNum == null || |
| | | a.modelNum == "" || |
| | | a.modelNum == "null" |
| | | ? "" |
| | | : "-" + a.modelNum); |
| | | } |
| | | } else { |
| | | a.model = |
| | | a.model + |
| | | (a.modelNum == null || |
| | | a.modelNum == "" || |
| | | a.modelNum == "null" |
| | | ? "" |
| | | : "-" + a.modelNum); |
| | | } |
| | | a.insProduct = a.insProduct.filter((b) => b.state === 1); |
| | | return a; |
| | | }) |
| | | ), |
| | | pairing: JSON.stringify(this.bsm2Val2), |
| | | fiberPairing: JSON.stringify(this.fiberPairing), |
| | | }), |
| | | }) |
| | | addInsOrder({ |
| | | insOrder: this.addObj, |
| | | list: sampleList.map((a) => { |
| | | a.model = |
| | | a.model + |
| | | (a.modelNum == null || a.modelNum == "" || a.modelNum == "null" |
| | | ? "" |
| | | : "-" + a.modelNum); |
| | | a.insProduct = a.insProduct.filter((b) => b.state === 1); |
| | | return a; |
| | | }), |
| | | pairing: this.bsm2Val2, |
| | | fiberPairing: this.fiberPairing, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("å·²æäº¤"); |
| | | this.bsm3Dia = false; |
| | | this.$router.go(-1); |
| | | } |
| | | this.saveLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("å·²æäº¤"); |
| | | this.bsm3Dia = false; |
| | | this.$parent.playOrder(0); |
| | | }) |
| | | .catch((e) => { |
| | | .catch((error) => { |
| | | this.saveLoad = false; |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | upInsOrderOfState(state) { |
| | | if (state == 1) { |
| | | //this.saveLoad = true |
| | | this.issuedDialogVisible = true; |
| | | this.$axios |
| | | .post(this.$api.insOrder.selectOrderManDay, { |
| | | id: this.currentId, |
| | | selectOrderManDay({ |
| | | id: this.currentId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.distributeData.orderId = this.currentId; |
| | | this.distributeData.appointed = res.data; |
| | | console.log("çº¦å®æ¶é´", this.distributeData.appointed); |
| | | } |
| | | }) |
| | | .then((ress) => { |
| | | this.distributeData.orderId = this.currentId; |
| | | this.distributeData.appointed = ress.data; |
| | | console.log("çº¦å®æ¶é´", this.distributeData.appointed); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | setTimeout(() => { |
| | | this.issuedDialogVisible = true; |
| | | }, 1000); |
| | | // this.$axios.post(this.$api.insOrder.upInsOrderOfState, { |
| | | // state, |
| | | // id: this.currentId, |
| | | // companyId:this.addObj.companyId, |
| | | // laboratory:this.addObj.laboratory, |
| | | // company: this.addObj.company |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // this.saveLoad = false |
| | | // if (res.code == 201) return |
| | | // this.$message.success('æäº¤æå') |
| | | |
| | | // this.$parent.multipleSelection = [{id: this.currentId}] |
| | | // this.$parent.print() |
| | | // å¦æç´§æ¥ç¨åº¦ä¸ºç´§æ¥ï¼éè¦ç´æ¥ä¸å人å |
| | | // if (this.addObj.type == 2) { |
| | | // this.issuedDialogVisible = true; |
| | | // this.$axios.post(this.$api.insOrder.selectOrderManDay, { |
| | | // id: this.currentId |
| | | // }).then(ress => { |
| | | // this.distributeData.orderId = this.currentId |
| | | // this.distributeData.appointed = ress.data |
| | | // }) |
| | | // } else { |
| | | // this.$parent.playOrder(0) |
| | | // } |
| | | |
| | | // this.$axios.post(this.$api.insOrder.selectOrderManDay, { |
| | | // id: this.currentId |
| | | // }).then(ress => { |
| | | // this.distributeData.orderId = this.currentId |
| | | // this.distributeData.appointed = ress.data |
| | | // }) |
| | | // setTimeout(() => { |
| | | // this.issuedDialogVisible = true; |
| | | // }, 1000) |
| | | // }) |
| | | } else { |
| | | // ä¸éè¿ |
| | | this.noDialogVisible = true; |
| | | } |
| | | }, |
| | | getLabelPrinting(currentId) { |
| | | this.$axios |
| | | .post(this.$api.insOrder.labelPrinting, { |
| | | ids: currentId, |
| | | }) |
| | | labelPrinting({ |
| | | ids: currentId, |
| | | }) |
| | | .then((res) => { |
| | | //å®¡æ ¸éè¿ï¼é»è®¤åªæå°ç¬¬ä¸ä¸ªæ ·åæ ç¾ |
| | | let firstSample = res.data[0]; |
| | | let arr1 = []; |
| | | firstSample.insProduct.forEach((b) => { |
| | | arr1.push(b.inspectionItem); |
| | | }); |
| | | firstSample.item = [...new Set(arr1)].join(","); |
| | | // arr.forEach((a) => { |
| | | // let arr1 = []; |
| | | // a.insProduct.forEach((b) => { |
| | | // arr1.push(b.inspectionItem); |
| | | // }); |
| | | // a.item = [...new Set(arr1)].join(","); |
| | | // }); |
| | | this.beginPrint(firstSample); |
| | | if (res.code === 200) { |
| | | //å®¡æ ¸éè¿ï¼é»è®¤åªæå°ç¬¬ä¸ä¸ªæ ·åæ ç¾ |
| | | let firstSample = res.data[0]; |
| | | let arr1 = []; |
| | | firstSample.insProduct.forEach((b) => { |
| | | arr1.push(b.inspectionItem); |
| | | }); |
| | | firstSample.item = [...new Set(arr1)].join(","); |
| | | this.beginPrint(firstSample); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | //å¼å§æ ç¾æå° |
| | |
| | | return; |
| | | } |
| | | // let flag = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrderOfState, |
| | | { |
| | | state: 1, |
| | | id: this.currentId, |
| | | companyId: this.addObj.companyId, |
| | | laboratory: this.addObj.laboratory, |
| | | company: this.addObj.company, |
| | | isCreate: this.distributeData.isCreate, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | upInsOrderOfState({ |
| | | state: 1, |
| | | id: this.currentId, |
| | | companyId: this.addObj.companyId, |
| | | laboratory: this.addObj.laboratory, |
| | | company: this.addObj.company, |
| | | isCreate: this.distributeData.isCreate, |
| | | }) |
| | | .then((res) => { |
| | | // flag = false; |
| | | |
| | | // if (flag) { |
| | | // this.$message.error("å§æç¼å·çæå¤±è´¥"); |
| | | // return; |
| | | // } |
| | | this.upLoad = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrder, |
| | | { |
| | | orderId: this.distributeData.orderId, |
| | | appointed: this.distributeData.appointed, |
| | | userIdList: this.distributeData.userId, |
| | | sonLaboratory: this.distributeData.sonLaboratory, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false; |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.upLoad = false; |
| | | this.issuedDialogVisible = false; |
| | | this.$parent.playOrder(0); |
| | | //å®¡æ ¸éè¿åï¼èªå¨æå°äºç»´ç |
| | | //TODO: çµåè¯éªå®¤ææ¶ä¸ç¨æ ç¾æå° |
| | | if ( |
| | | this.sonLaboratoryList.filter((f) => f.value === "çµåè¯éªå®¤") |
| | | .length === 0 |
| | | ) { |
| | | this.$nextTick(() => { |
| | | this.getLabelPrinting(this.currentId); |
| | | }); |
| | | } |
| | | if (res.code === 200) { |
| | | this.upLoad = true; |
| | | upInsOrder({ |
| | | orderId: this.distributeData.orderId, |
| | | appointed: this.distributeData.appointed, |
| | | userIdList: this.distributeData.userId, |
| | | sonLaboratory: this.distributeData.sonLaboratory, |
| | | }) |
| | | .catch((e) => { |
| | | this.$message.error("æäº¤å¤±è´¥"); |
| | | this.upLoad = false; |
| | | }); |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false; |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.issuedDialogVisible = false; |
| | | this.upLoad = false; |
| | | this.$router.go(-1); |
| | | //å®¡æ ¸éè¿åï¼èªå¨æå°äºç»´ç |
| | | //TODO: çµåè¯éªå®¤ææ¶ä¸ç¨æ ç¾æå° |
| | | if ( |
| | | this.sonLaboratoryList.filter((f) => f.value === "çµåè¯éªå®¤") |
| | | .length === 0 |
| | | ) { |
| | | this.$nextTick(() => { |
| | | this.getLabelPrinting(this.currentId); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error("æäº¤å¤±è´¥"); |
| | | this.upLoad = false; |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | getUserNow() { |
| | | this.$axios.get(this.$api.user.getUserNow).then((res) => { |
| | | let selects = res.data; |
| | | if (selects == null) return; |
| | | this.addObj.userId = selects.id; |
| | | this.addObj.company = selects.company; |
| | | this.addObj.custom = selects.name; |
| | | this.addObj.code = selects.code; |
| | | this.addObj.phone = selects.phone; |
| | | this.addObj.companyId = selects.departId; |
| | | this.addObj.production = "/"; |
| | | this.addObj.productionEn = "/"; |
| | | if (this.active == 1) { |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | }); |
| | | init() { |
| | | if (this.addObj.custom == "" || this.addObj.custom == null) { |
| | | this.addObj.custom = this.loginUserInfo.nickName; //设置å¶å人为å½åç»å½äºº |
| | | } else { |
| | | this.addObj.custom = this.loginUserInfo.nickName; |
| | | } |
| | | this.addObj.company = this.loginUserInfo.companyName; |
| | | this.addObj.companyId = this.loginUserInfo.company; |
| | | this.addObj.userId = this.loginUserInfo.userId; |
| | | // this.addObj.code = this.loginUserInfo.code; |
| | | this.addObj.phone = this.loginUserInfo.phoneNumber; |
| | | this.addObj.production = "/"; |
| | | this.addObj.productionEn = "/"; |
| | | if (this.active == 1) { |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | }, |
| | | getProNum() { |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set( |
| | | this.$set( |
| | | this.sampleSelectionList[i], |
| | | "proNum", |
| | | m.insProduct.filter((a) => a.state == 1).length |
| | |
| | | } |
| | | }, |
| | | selectStandardTreeList() { |
| | | this.$axios |
| | | .get(this.$api.standardTree.selectStandardTreeList2) |
| | | selectStandardTreeList2() |
| | | .then((res) => { |
| | | this.list = res.data; |
| | | this.list.forEach((a) => { |
| | | this.expandedKeys.push(a.label); |
| | | }); |
| | | if (res.code === 200) { |
| | | this.list = res.data; |
| | | this.list.forEach((a) => { |
| | | this.expandedKeys.push(a.label); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | filterNode(value, data) { |
| | |
| | | }, |
| | | selectsStandardMethodByFLSSM() { |
| | | this.methodLoad = true; |
| | | this.$axios |
| | | .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: this.selectTree, |
| | | }) |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: this.selectTree, |
| | | }) |
| | | .then((res) => { |
| | | this.methodLoad = false; |
| | | try { |
| | | if ( |
| | | res.data.standardMethodList.length == 0 && |
| | | this.selectTree.split("-").length == 5 |
| | | ) { |
| | | let arr = this.selectTree.split("-"); |
| | | let arr0 = arr.slice(0, arr.length - 1); |
| | | let selectTree = arr0 |
| | | .join("-") |
| | | .substring(0, arr0.join("-").length - 1); |
| | | this.$axios |
| | | .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | if (res.code === 200) { |
| | | this.methodLoad = false; |
| | | try { |
| | | if ( |
| | | res.data.standardMethodList.length == 0 && |
| | | this.selectTree.split("-").length == 5 |
| | | ) { |
| | | let arr = this.selectTree.split("-"); |
| | | let arr0 = arr.slice(0, arr.length - 1); |
| | | let selectTree = arr0 |
| | | .join("-") |
| | | .substring(0, arr0.join("-").length - 1); |
| | | template() |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: selectTree, |
| | | }) |
| | | .then((ress) => { |
| | | this.methods = ress.data.standardMethodList; |
| | | }); |
| | | } else { |
| | | this.methods = res.data.standardMethodList; |
| | | } |
| | | } catch (e) {} |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.methods = ress.data.standardMethodList; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | this.methods = res.data.standardMethodList; |
| | | } |
| | | } catch (e) {} |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | addStandardTree(currentValue, oldValue) { |
| | |
| | | console.log("upProductSelect", this.sampleList); |
| | | }, |
| | | searchProject() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "å
纤项ç®", |
| | | }) |
| | | getDicts("fiber_type") |
| | | .then((res) => { |
| | | this.opticalProject = res.data; |
| | | if (res.code === 200) { |
| | | this.opticalProject = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | permute(nums) { |
| | |
| | | return "warning-row"; |
| | | }, |
| | | selectInsOrderTemplate() { |
| | | this.$axios |
| | | .get( |
| | | this.$api.insOrder.selectInsOrderTemplate + |
| | | "?company=" + |
| | | this.addObj.company |
| | | ) |
| | | selectInsOrderTemplate({ company: this.addObj.company }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.templates = res.data; |
| | | if (res.code === 200) { |
| | | this.templates = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // å 餿¨¡æ¿--è°ç¨æ¥å£ |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.insOrder.delInsOrderTemplate, { |
| | | id: row.id, |
| | | }) |
| | | delInsOrderTemplate({ |
| | | id: row.id, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | if (res.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | this.$message.success("å 餿å"); |
| | | this.selectInsOrderTemplate(); |
| | | }) |
| | | .catch((e) => { |
| | | .catch((error) => { |
| | | this.$message.error("å é¤å¤±è´¥"); |
| | | console.error(error); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | addTemplateDia() { |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.addInsOrderTemplate, |
| | | { |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | | selectTree: this.selectTree, |
| | | }), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | addInsOrderTemplate({ |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | | selectTree: this.selectTree, |
| | | }), |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.templateLoading = false; |
| | | this.templateDia = false; |
| | | this.$message.success("ä¿åæå"); |
| | | this.selectInsOrderTemplate(); |
| | | this.templateName = ""; |
| | | if (res.code === 200) { |
| | | this.templateLoading = false; |
| | | this.templateDia = false; |
| | | this.$message.success("ä¿åæå"); |
| | | this.selectInsOrderTemplate(); |
| | | this.templateName = ""; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | this.$message.error("è¯·å¡«åæ¨¡æ¿åç§°"); |
| | |
| | | }, |
| | | // æ¥è¯¢æ¨¡æ¿ |
| | | selectInsOrderTemplateById(e) { |
| | | this.$axios |
| | | .post(this.$api.insOrder.selectInsOrderTemplateById + "?id=" + e) |
| | | selectInsOrderTemplateById({ id: e }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | // let obj = JSON.parse(res.data) |
| | | let obj = res.data; |
| | | console.log(obj); |
| | | //å¶å人设置为å½åç»å½ç¨æ· |
| | | let user = JSON.parse(localStorage.getItem("user")); |
| | | obj.addObj.custom = user.name; |
| | | obj.addObj.userId = user.userId; |
| | | this.addObj = obj.addObj; |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree; |
| | | //é»è®¤éä¸ç¬¬ä¸ä¸ªæ ·å |
| | | this.$nextTick(() => { |
| | | if (this.sampleList.length > 0) { |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | let obj = res.data; |
| | | console.log(obj); |
| | | //å¶å人设置为å½åç»å½ç¨æ· |
| | | obj.addObj.custom = this.loginUserInfo.nickName; |
| | | obj.addObj.userId = this.loginUserInfo.userId; |
| | | this.addObj = obj.addObj; |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree; |
| | | //é»è®¤éä¸ç¬¬ä¸ä¸ªæ ·å |
| | | this.$nextTick(() => { |
| | | if (this.sampleList.length > 0) { |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | delSampleAndProduct() { |
| | |
| | | let selectTreeList = this.selectTree.split(" - "); |
| | | this.addObj.model && |
| | | (selectTreeList[selectTreeList.length - 1] = this.addObj.model); |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | selectStandardProductList({ |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }) |
| | | .then((res) => { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | this.searchProject(); |
| | | this.searchTemList(); |
| | |
| | | let selectTreeList = this.selectTree.split(" - "); |
| | | this.addObj.model && |
| | | (selectTreeList[selectTreeList.length - 1] = this.addObj.model); |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | selectStandardProductList({ |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }) |
| | | .then((res) => { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | this.searchProject(); |
| | | this.searchTemList(); |
| | | }, |
| | | searchTemList() { |
| | | this.temperatureList = []; |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµåæ¸©åº¦å¾ªç¯æ£éª", |
| | | }) |
| | | getDicts("temperature_cycling_type") |
| | | .then((res) => { |
| | | if (res.data.length > 0) { |
| | | if (res.code === 200) { |
| | | this.temperatureEngList = res.data; |
| | | res.data.forEach((item) => { |
| | | this.temperatureList.push(item.label); |
| | | this.temperatureList.push(item.dictLabel); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | changeModel() { |
| | |
| | | // }) |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios |
| | | .get(this.$api.standardTree.selectStandardMethodEnum) |
| | | selectStandardMethodEnum() |
| | | .then((res) => { |
| | | this.methods = res.data; |
| | | if (res.code === 200) { |
| | | this.methods = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectable() { |
| | |
| | | return; |
| | | } |
| | | this.noLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrderOfState, |
| | | { |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | upInsOrderOfState({ |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell, |
| | | }) |
| | | .then((res) => { |
| | | this.noLoading = false; |
| | | this.tell = ""; |
| | | if (res.code == 201) return; |
| | | this.$message.success("æäº¤æå"); |
| | | this.issuedDialogVisible = false; |
| | | this.$parent.playOrder(0); |
| | | if (res.code === 200) { |
| | | this.noLoading = false; |
| | | this.tell = ""; |
| | | this.$message.success("æäº¤æå"); |
| | | this.issuedDialogVisible = false; |
| | | this.$router.go(-1); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectEnumByCategoryForSonLaboratory() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "åå®éªå®¤", |
| | | }) |
| | | getDicts("sys_sub_lab") |
| | | .then((res) => { |
| | | this.factory = []; |
| | | res.data.forEach((a) => { |
| | | this.filters.push({ |
| | | text: a.label, |
| | | value: a.value, |
| | | if (res.code === 200) { |
| | | this.factory = []; |
| | | res.data.forEach((a) => { |
| | | this.filters.push({ |
| | | text: a.dictLabel, |
| | | value: a.dictValue, |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | filterHandler(value, row, column) { |
| | |
| | | return; |
| | | } |
| | | this.sampleIds = [this.sampleId]; |
| | | this.$axios |
| | | .post(this.$api.insBushing.selectBushingBySampleId, { |
| | | sampleId: this.sampleId, |
| | | }) |
| | | selectBushingBySampleId({ |
| | | sampleId: this.sampleId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("è¯¥æ ·åæ²¡æé
ç½®å
纤"); |
| | | return; |
| | | } |
| | | for (var i in this.sampleList) { |
| | | if ((this.sampleList[i].id = this.sampleId)) { |
| | | this.sampleList[i].bushing = res.data; |
| | | break; |
| | | if (res.code === 200) { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("è¯¥æ ·åæ²¡æé
ç½®å
纤"); |
| | | return; |
| | | } |
| | | for (var i in this.sampleList) { |
| | | if ((this.sampleList[i].id = this.sampleId)) { |
| | | this.sampleList[i].bushing = res.data; |
| | | break; |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.configShow = true; |
| | | }); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.configShow = true; |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.$message.error("æªé䏿 ·å"); |
| | | return; |
| | | } |
| | | // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { |
| | | // sampleId: this.sampleId |
| | | // }).then(res => { |
| | | // if (res.data.length === 0) { |
| | | // this.$message.error('è¯¥æ ·åæ²¡æé
ç½®å
纤') |
| | | // return |
| | | // } |
| | | // for (var i in this.sampleList) { |
| | | // if (this.sampleList[i].id = this.sampleId) { |
| | | // this.sampleList[i].bushing = res.data |
| | | // break |
| | | // } |
| | | // } |
| | | // this.configShow = true |
| | | // }) |
| | | } |
| | | }, |
| | | openCableConfig() { |
| | |
| | | this.$message.error("æªé䏿 ·å"); |
| | | return; |
| | | } |
| | | // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { |
| | | // sampleId: this.sampleId |
| | | // }).then(res => { |
| | | // if (res.data.length === 0) { |
| | | // this.$message.error('è¯¥æ ·åæ²¡æé
ç½®å
纤') |
| | | // return |
| | | // } |
| | | // for (var i in this.sampleList) { |
| | | // if (this.sampleList[i].id = this.sampleId) { |
| | | // this.sampleList[i].bushing = res.data |
| | | // break |
| | | // } |
| | | // } |
| | | // this.configShow = true |
| | | // }) |
| | | } |
| | | }, |
| | | upBsm1(val) { |
| | |
| | | </li> |
| | | </ul> |
| | | <lims-table |
| | | highlightCurrentRow |
| | | isSelection |
| | | :tableData="tableData" |
| | | :height="tableHeight + ''" |
| | |
| | | fullscreen |
| | | > |
| | | <lims-table |
| | | highlightCurrentRow |
| | | :heigt="'80vh'" |
| | | :tableData="dataLooktableData" |
| | | :column="dataLookcolumn" |
| | |
| | | import getLodop from "@/utils/lodop"; |
| | | import Add from "./add.vue"; |
| | | import { mapGetters } from "vuex"; |
| | | import LimsTable from "../../../components/Table/lims-table.vue"; |
| | | import LimsTable from "@/components/Table/lims-table.vue"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | |
| | | prop: "sampleName", |
| | | minWidth: "160px", |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkEvent: { |
| | | method: "showDetails", |
| | | vueComponent: this, |
| | | }, |
| | | }, |
| | | { |
| | | label: "æ ·åç¼å·", |
| | |
| | | this.beginPrint(this.qrData); |
| | | }); |
| | | this.printDialogVisible = false; |
| | | |
| | | // PrintJS({ |
| | | // printable: "printMOrder", //é¡µé¢ |
| | | // type: "html", //ææ¡£ç±»å |
| | | // maxWidth: 360, |
| | | // style: `@page { |
| | | // margin:0; |
| | | // size: 400px 75px collapse; |
| | | // margin-top:3px; |
| | | // &:first-of-type{ |
| | | // margin-top:0 !important; |
| | | // } |
| | | // } |
| | | // html{ |
| | | // zoom:100%; |
| | | // } |
| | | // @media print{ |
| | | // width: 400px; |
| | | // height: 75px; |
| | | // margin:0; |
| | | // }`, |
| | | // onPrintDialogClose: (this.erexcel = false), |
| | | // targetStyles: ["*"], // 使ç¨domçæææ ·å¼ï¼å¾éè¦ |
| | | // font_size: "0.15cm", |
| | | // }); |
| | | }, |
| | | print() { |
| | | if (this.multipleSelection.length == 0) { |
| | |
| | | } |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy); |
| | | this.upIndex++; |
| | | this.queryParams = { |
| | | entrustCode: "", |
| | | outEntrustCode: "", |
| | | sampleName: "", |
| | | sampleModel: "", |
| | | sampleCode: "", |
| | | startAndEndTime: [], |
| | | name: "", |
| | | engineering: "", |
| | | production: "", |
| | | }; |
| | | this.refreshTable(); |
| | | }, |
| | | // æéåé
|
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem("power")); |
| | | let up = false; |
| | | let del = false; |
| | | let revoke = false; |
| | | let check = false; |
| | | let checkUpdate = false; |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == "upInsOrder") { |
| | | up = true; |
| | | } |
| | | if (power[i].menuMethod == "updateStatus") { |
| | | revoke = true; |
| | | } |
| | | if (power[i].menuMethod == "upInsOrderOfState") { |
| | | check = true; |
| | | } |
| | | if (power[i].menuMethod == "checkUpdate") { |
| | | checkUpdate = true; |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(5, 1); |
| | | } |
| | | if (!checkUpdate) { |
| | | this.componentData.do.splice(4, 1); |
| | | } |
| | | if (!revoke) { |
| | | this.componentData.do.splice(3, 1); |
| | | } |
| | | if (!check) { |
| | | this.componentData.do.splice(2, 1); |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.verifyDialogVisible = false; |
| | |
| | | this.exportCheckedDate = []; |
| | | this.dialogVisible1 = false; |
| | | }, |
| | | // 详æ
|
| | | selectAllByOne(row) { |
| | | this.active = 2; |
| | | // console.log(row); |
| | | // //æå¼å¼¹æ¡ |
| | | // this.dialogVisible = true; |
| | | // //row = ç¹å»å¯¹åºè¡å¼ |
| | | // //å¤å¶ç»formData |
| | | // this.formData = this.HaveJson(row); |
| | | this.currentId = row.id; |
| | | this.examine = 1; |
| | | // æ¥ç详æ
|
| | | showDetails(row) { |
| | | this.$router.push({ |
| | | name: "showDetails", |
| | | query: { |
| | | active: 2, |
| | | currentId: row.id, |
| | | examine: 1, |
| | | isReview: true, |
| | | }, |
| | | }); |
| | | }, |
| | | // æ°æ®æ¥ç |
| | | handleDataLook(row) { |
| | |
| | | }, |
| | | // ä¸å |
| | | playOrder(num) { |
| | | // this.active = num; |
| | | // this.examine = 0; |
| | | this.$router.push({ |
| | | name: "addOrder", |
| | | params: {}, |
| | | query: { |
| | | active: num, |
| | | examine: 0, |
| | | }, |
| | | }); |
| | | this.active = num; |
| | | this.examine = 0; |
| | | // this.refreshTable(); |
| | | }, |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |