Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
| | |
| | | ENV = 'development' |
| | | |
| | | # base api |
| | | VUE_APP_BASE_API = 'http://localhost:1234/' |
| | | VUE_APP_BASE_API = 'http://192.168.110.167:1234/' |
| | |
| | | |
| | | # base api |
| | | # VUE_APP_BASE_API = '/stage-api' |
| | | VUE_APP_BASE_API = 'http://192.168.110.254:1234/' |
| | | VUE_APP_BASE_API = 'http://192.168.110.87:1234/' |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | const Api = { |
| | | addStandardProjectGroup: "/productModel/selectfather", // æ·»å æ å-->鿩项ç®åç» |
| | | productModelSelectmater: "/productModel/selectmater", // éæ©æ ·ååç§° |
| | | addproductModel: "/productModel/addproductModel", // æ·»å æ å |
| | | selectproductModel: "/productModel/selectproductModel", // æ¥è¯¢æ 忍¡çå表 |
| | | deleteProductModel: "/productModel/delproductModel", // å 餿 忍¡ç |
| | | selectproductModelById: "/productModel/selectproductModelById", // æ ¹æ®idæ¥è¯¢ |
| | | updateProductModel: "/productModel/writeproductModel", // æ´æ°æ å -->ç¼è¾ |
| | | deleteList: "/productModel/delAllproductModel", // æ¹éå é¤ |
| | | |
| | | } |
| | | |
| | | export function addStandardProjectGroupApi() { |
| | | return request({ |
| | | url: Api.addStandardProjectGroup, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function productModelSelectmaterApi() { |
| | | return request({ |
| | | url: Api.productModelSelectmater, |
| | | method: "get" |
| | | }) |
| | | } |
| | | |
| | | export function addproductModelApi(formData) { |
| | | return request({ |
| | | url: Api.addproductModel, |
| | | method: 'post', |
| | | data: formData |
| | | }) |
| | | } |
| | | |
| | | export function updateProductModelApi(formData) { |
| | | return request({ |
| | | url: Api.updateProductModel + '?id=' + formData.id, |
| | | method: 'post', |
| | | data: formData |
| | | }) |
| | | } |
| | | |
| | | export function selectproductModelApi(params) { |
| | | return request({ |
| | | url: Api.selectproductModel, |
| | | method: "get", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function deleteProductModelApi(id){ |
| | | return request({ |
| | | url: Api.deleteProductModel, |
| | | method: "post", |
| | | params: {id: id} |
| | | }) |
| | | } |
| | | |
| | | export function selectproductModelByIdApi(id){ |
| | | return request({ |
| | | url: Api.selectproductModelById, |
| | | method: "get", |
| | | params: {id: id} |
| | | }) |
| | | } |
| | | |
| | | export function deleteListApi(id){ |
| | | return request({ |
| | | url: Api.deleteList, |
| | | method: "post", |
| | | params:{ids: id.toString()} |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getSupplierList(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getSupplierList', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ ·ååæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getTestSampleStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getTestSampleStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | /** |
| | | * ä¾åºååæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getSupplierNoPassStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getSupplierNoPassStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 项ç®åæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getNoPassProjectStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getNoPassProjectStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | |
| | | data |
| | | }) |
| | | } |
| | | //ä¿®æ¹è®¡é |
| | | export function updateMetricalInformationInfo(data) { |
| | | return request({ |
| | | url: '/metrical-information/updateMetricalInformationInfo', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | childMethod(){ |
| | | this.$refs.child.combackLookPlan() |
| | | this.$refs.child.combackLookPlan() |
| | | }, |
| | | triggerMainBtnPlan(){ |
| | | this.$parent.triggerCombackBtn() |
| | |
| | | width: 100%; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | background: #fff; |
| | | background: #f8f8f8; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | |
| | |
| | | children: [ |
| | | { |
| | | path: 'inspectionApplication', |
| | | name: 'InspectionApplication', |
| | | name: 'inspectionApplication', |
| | | component: () => import('@/views/experiment/inspectionApplication/index'), |
| | | meta: { title: 'æ°å¢æ£éª', icon: 'tree' } |
| | | }, |
| | | { |
| | | path: 'Viewdetails', |
| | | name: 'Viewdetails', |
| | | hidden: true , |
| | | component: () => import('@/views/experiment/inspectionApplication/Viewdetails/index'), |
| | | meta: { title: '详æ
页', icon: 'tree' } |
| | | }, |
| | | { |
| | | path: 'planAssignments', |
| | | name: 'PlanAssignments', |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/baseData', |
| | | component: Layout, |
| | | redirect: '/baseData/basicDataMessage', |
| | | meta: { title: 'åºç¡æ°æ®', icon: 'el-icon-s-tools' }, |
| | | children: [ |
| | | { |
| | | path: '/basicDataMessage', |
| | | name: 'BasicDataMessage', |
| | | component: () => import('@/views/basicData/index'), |
| | | meta: { title: 'åºç¡æ°æ®', icon: 'el-icon-s-tools' } |
| | | } |
| | | ] |
| | | }, |
| | | // 404 page must be placed at the end !!! |
| | | { path: '*', redirect: '/404', hidden: true } |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main_div"> |
| | | <div class="top_div"> |
| | | <span>æ ·ååç§°ï¼</span> |
| | | <el-select |
| | | v-model="params.material" |
| | | size="small" |
| | | placeholder="è¯·éæ©æ ·ååç§°" |
| | | > |
| | | <el-option |
| | | v-for="item in productModelSelectmater" |
| | | :value="item" |
| | | :key="item.index" |
| | | :label="item" |
| | | ></el-option> |
| | | </el-select> |
| | | <span class="top_div_span">项ç®åç»ï¼</span> |
| | | <el-input |
| | | v-model="params.father" |
| | | placeholder="请è¾å
¥é¡¹ç®åç»" |
| | | style="width: 10%" |
| | | size="small " |
| | | ></el-input> |
| | | <span class="top_div_span">项ç®åç§°ï¼</span> |
| | | <el-input |
| | | v-model="params.name" |
| | | placeholder="请è¾å
¥é¡¹ç®åç§°" |
| | | style="width: 10%" |
| | | size="small " |
| | | ></el-input> |
| | | <el-button |
| | | type="primary" |
| | | class="top_div_button" |
| | | size="small" |
| | | @click="selectProductModelTable" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button class="top_div_button" size="small" @click="params = {}" |
| | | >éç½®</el-button |
| | | > |
| | | <div style="float: right"> |
| | | <el-button |
| | | class="top_div_button" |
| | | type="primary" |
| | | size="small" |
| | | icon="el-icon-folder-add" |
| | | @click="centerDialogVisible = true" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-dialog |
| | | :visible.sync="centerDialogVisible" |
| | | width="30%" |
| | | right |
| | | :before-close="handleClose" |
| | | > |
| | | <template slot="title"> |
| | | <div class="addTop"> |
| | | <span>{{ isUpdate ? "æ´æ°" : "æ°å¢" }}åºç¡æ°æ®</span> |
| | | </div> |
| | | </template> |
| | | <el-form :model="form" :rules="rules" ref="ruleForm" class="addForm"> |
| | | <el-form-item prop="material" required> |
| | | <span>æ ·ååç§°ï¼</span> |
| | | <el-select |
| | | v-model="form.material" |
| | | style="width: 85%" |
| | | placeholder="è¯·éæ©æ ·ååç§°" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in productModelSelectmater" |
| | | :key="index" |
| | | :value="item" |
| | | :label="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <span>项ç®åç»ï¼</span> |
| | | <el-select |
| | | v-model="form.father" |
| | | style="width: 85%" |
| | | placeholder="è¯·éæ©é¡¹ç®åç»" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in projectGroupingOptions" |
| | | :key="index" |
| | | :value="item" |
| | | :label="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12" |
| | | ><el-form-item prop="name" required |
| | | ><span>项ç®åç§°ï¼</span> |
| | | <el-input |
| | | style="width: 70%" |
| | | v-model="form.name" |
| | | placeholder="请è¾å
¥é¡¹ç®åç§°" |
| | | ></el-input></el-form-item |
| | | ></el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="unit"> |
| | | <span |
| | | v-html="'å ä½ï¼'" |
| | | ></span> |
| | | <el-input |
| | | style="width: 70%" |
| | | v-model="form.unit" |
| | | placeholder="请è¾å
¥åä½" |
| | | ></el-input></el-form-item |
| | | ></el-col> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false" size="small " |
| | | >å æ¶</el-button |
| | | > |
| | | <el-button type="primary" @click="submitAdd" size="small ">{{ |
| | | isUpdate ? "æ´ æ°" : "ä¿ å" |
| | | }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-button |
| | | class="top_div_button" |
| | | icon="el-icon-delete-solid" |
| | | size="small" |
| | | style="color: #00a5ff" |
| | | @click="deleteListClick" |
| | | >å é¤</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="table_div"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%; margin-bottom: 20px" |
| | | row-key="name" |
| | | border |
| | | height="calc(100vh - 250px)" |
| | | default-expand-all |
| | | ref="multipleTable" |
| | | @select="selectTr" |
| | | @select-all="selectAll" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column type="selection" label="åºå·"> </el-table-column> |
| | | <el-table-column |
| | | type="index" |
| | | width="50px" |
| | | label="åºå·" |
| | | ></el-table-column> |
| | | <el-table-column label="项ç®åç§°" sortable> |
| | | <template scope="scope"> |
| | | <el-tag |
| | | ><div |
| | | class="firstDiv" |
| | | :style="`color: ${ |
| | | scope.row.code == '[1]' ? '#16a7ff' : '#58c173' |
| | | }`" |
| | | > |
| | | {{ scope.row.code == "[1]" ? "01" : "02" }} |
| | | </div> |
| | | <span style="color: black">{{ scope.row.name }}</span></el-tag |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½" sortable></el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.code == '[2]' || scope.row.edit == true"> |
| | | <el-button type="text" size="mini" @click="childrenClick(scope)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click="deleteTreeChildren(scope)" |
| | | >å é¤</el-button |
| | | > |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addStandardProjectGroupApi, |
| | | productModelSelectmaterApi, |
| | | addproductModelApi, |
| | | selectproductModelApi, |
| | | deleteProductModelApi, |
| | | selectproductModelByIdApi, |
| | | updateProductModelApi, |
| | | deleteListApi, |
| | | } from "@/api/basicData/index"; |
| | | export default { |
| | | name: "BasicDataMessage", |
| | | data() { |
| | | return { |
| | | isAllSelect: false, |
| | | projectGroupingOptions: [], |
| | | productModelSelectmater: [], |
| | | value: "", |
| | | isUpdate: false, |
| | | projectName: "", |
| | | tableData: [], |
| | | centerDialogVisible: false, |
| | | deleteList: [], |
| | | form: { |
| | | material: "", // æ ·ååç§° |
| | | father: "", // 项ç®åç» |
| | | name: "", // 项ç®åç§° |
| | | unit: "", // åä½ |
| | | }, |
| | | params: { |
| | | material: "", |
| | | father: "", |
| | | name: "", |
| | | }, |
| | | rules: { |
| | | material: [ |
| | | { required: true, message: "è¯·éæ©æ ·ååç§°", trigger: "change" }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: "请è¾å
¥é¡¹ç®åç§°", trigger: "blur" }, |
| | | { |
| | | min: 2, |
| | | max: 25, |
| | | message: "é¿åº¦å¨ 2 å° 25 个å符", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | unit: [ |
| | | { required: true, message: "请è¾å
¥åä½", trigger: "blur" }, |
| | | { |
| | | min: 1, |
| | | max: 25, |
| | | message: "é¿åº¦å¨ 1 å° 25 个å符", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | submitAdd() { |
| | | if (!this.isUpdate) { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | addproductModelApi(this.form).then((res) => { |
| | | this.centerDialogVisible = false; |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.selectProductModelTable(); |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | updateProductModelApi(this.form).then((res) => { |
| | | this.centerDialogVisible = false; |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.selectProductModelTable(); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | async selectProductMaster() { |
| | | await productModelSelectmaterApi().then((res) => { |
| | | this.productModelSelectmater = res.data; |
| | | }); |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm("确认å
³éï¼") |
| | | .then((_) => { |
| | | this.centerDialogVisible = false; |
| | | done(); |
| | | }) |
| | | .catch((_) => {}); |
| | | }, |
| | | selectProductModelTable() { |
| | | selectproductModelApi(this.params).then((res) => { |
| | | res.data.forEach((i) => { |
| | | if (i.name === undefined) { |
| | | i.name = i.children[0].name; |
| | | i.unit = i.children[0].unit; |
| | | i.id = i.children[0].id; |
| | | i.edit = true; |
| | | delete i.children; |
| | | } |
| | | }); |
| | | this.tableData = res.data; |
| | | this.selectDataList(); |
| | | }); |
| | | }, |
| | | childrenClick(scope) { |
| | | this.isUpdate = true; |
| | | let father = ""; |
| | | selectproductModelByIdApi(scope.row.id).then((res) => { |
| | | let result = res.data; |
| | | this.form.name = result.name; |
| | | this.form.material = result.material; |
| | | this.form.father = result.father; |
| | | this.form.unit = result.unit; |
| | | this.form.id = scope.row.id; |
| | | }); |
| | | this.centerDialogVisible = true; |
| | | }, |
| | | selectDataList() { |
| | | this.tableData.forEach((a) => { |
| | | a.code = "[1]"; |
| | | if (a.children != undefined) { |
| | | a.children.forEach((b) => { |
| | | b.code = "[2]"; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | deleteTreeChildren(scope) { |
| | | deleteProductModelApi(scope.row.id).then((res) => { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.selectProductModelTable(); |
| | | }); |
| | | }, |
| | | |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | // èªå®ä¹ |
| | | if (this.isAllSelect) { |
| | | val.forEach((i) => { |
| | | let isExist = false; |
| | | this.deleteList.findIndex((c) => { |
| | | if (c === i.id) { |
| | | isExist = true; |
| | | } |
| | | }); |
| | | if (!isExist && i.id !== undefined) { |
| | | this.deleteList.push(i.id); |
| | | } |
| | | }); |
| | | } else { |
| | | this.deleteList.splice(0, this.deleteList.length); |
| | | } |
| | | // èªå®ä¹ç»æ |
| | | }, |
| | | //éæ©æè¡ |
| | | selectTr(selection, row) { |
| | | this.$set(row, "isChecked", !row.isChecked); |
| | | this.$nextTick(() => { |
| | | this.isAllSelect = row.isChecked; |
| | | this.toggleSelect(row, row.isChecked, "tr"); |
| | | }); |
| | | |
| | | if (row.isChecked === true) { |
| | | if (row.children !== undefined) { |
| | | row.children.forEach((i) => { |
| | | this.deleteList.push(i.id); |
| | | }); |
| | | } else { |
| | | this.deleteList.push(row.id); |
| | | } |
| | | } else if (row.isChecked === false) { |
| | | if (row.children !== undefined) { |
| | | row.children.forEach((i) => { |
| | | this.deleteList.findIndex((c, index) => { |
| | | if (c === i.id) { |
| | | this.deleteList.splice(index, 1); |
| | | return; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | this.deleteList.findIndex((c, index) => { |
| | | if (c === row.id) { |
| | | this.deleteList.splice(index, 1); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //éå½å级 |
| | | toggleSelect(data, flag, type) { |
| | | if (type === "all") { |
| | | if (data.length > 0) { |
| | | data.forEach((item) => { |
| | | this.toggleSelection(item, flag); |
| | | if (item.children && item.children.length > 0) { |
| | | this.toggleSelect(item.children, flag, type); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | if (data.children && data.children.length > 0) { |
| | | data.children.forEach((item) => { |
| | | item.isChecked = !item.isChecked; |
| | | this.$refs.multipleTable.toggleRowSelection(item, flag); |
| | | this.toggleSelect(item, flag, type); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | deleteListClick() { |
| | | deleteListApi(this.deleteList).then((res) => { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.selectProductModelTable(); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.selectProductMaster().then((res) => { |
| | | this.params.material = this.productModelSelectmater[0]; |
| | | this.selectProductModelTable(); |
| | | }); |
| | | }, |
| | | watch: { |
| | | centerDialogVisible: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal == true) { |
| | | addStandardProjectGroupApi().then((res) => { |
| | | this.projectGroupingOptions = res.data; |
| | | }); |
| | | } else { |
| | | // è¯·æ±æåæ¸
餿°æ® |
| | | this.form = {}; |
| | | // æäº¤æåæ¸
餿£éª |
| | | this.$refs.ruleForm.resetFields(); |
| | | this.isUpdate = false; |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .el-tag.el-tag { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | .el-tag.el-tag:hover { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | .firstDiv { |
| | | float: left; |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #eff5ff; |
| | | margin-top: 5px; |
| | | justify-content: center; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 8px; |
| | | } |
| | | .main_div { |
| | | width: 100%; |
| | | position: relative; |
| | | padding: 0 10px 10px 10px; |
| | | } |
| | | .el-dialog__header { |
| | | padding: 0; |
| | | } |
| | | .el-dialog__headerbtn { |
| | | top: 0; |
| | | } |
| | | .el-dialog__close { |
| | | padding: 8px 0; |
| | | color: #ffffff !important; |
| | | } |
| | | .addForm { |
| | | padding: 20px 20px 0 20px; |
| | | } |
| | | .addForm .el-form-item__error { |
| | | left: 66px; |
| | | } |
| | | .el-dialog { |
| | | border-radius: 10px; |
| | | } |
| | | .el-dialog__body { |
| | | padding: 30px 20px 0 20px; |
| | | } |
| | | .addTop { |
| | | border-top-left-radius: 10px; |
| | | border-top-right-radius: 10px; |
| | | background-color: #00a5ff; |
| | | color: #ffffff; |
| | | padding: 8px 20px; |
| | | float: left; |
| | | height: 30px; |
| | | width: 100%; |
| | | } |
| | | .addTop span { |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | } |
| | | .table_div { |
| | | margin-top: 10px; |
| | | width: 100%; |
| | | height: calc(100vh - 230px); |
| | | background-color: #ffffff; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .top_div { |
| | | height: 120px; |
| | | width: 100%; |
| | | padding: 30px 40px; |
| | | background-color: #ffffff; |
| | | } |
| | | .top_div_span { |
| | | margin-left: 50px; |
| | | } |
| | | .top_div_button { |
| | | margin-left: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style="overflow: hidden;"> |
| | | <el-card style="margin: 10px;" v-model="searchData" > |
| | | <div slot="header" class="clearfix"> |
| | | <span> |
| | | <i slot="prefix" class="el-icon-s-home" /> |
| | | å®éªç®¡ç/åæææ£éªå</span> |
| | | </div> |
| | | <div class="card-content"> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¥ææ¥æ:" > |
| | | <el-input :disabled="true" v-model="searchData.from_time"></el-input> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ä¾åºååç§°:" > |
| | | <el-input :disabled="true" v-model="searchData.supplier"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产åç¼å·:"> |
| | | <el-input :disabled="true" v-model="searchData.mcode"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åææåç§°:"> |
| | | <el-input :disabled="true" v-model="searchData.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="è§æ ¼åå·:"> |
| | | <el-input :disabled="true" v-model="searchData.specifications"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="åä½:"> |
| | | <el-input :disabled="true" v-model="searchData.unit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ°é:"> |
| | | <el-input :disabled="true" v-model="searchData.num"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="ç»è®°æ¥æ:"> |
| | | <el-input :disabled="true" v-model="searchData.end_time"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="ç»è®°äºº:"> |
| | | <el-input :disabled="true" v-model="searchData.userName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | <el-row style="margin: 5px;"> |
| | | <el-col :span="12" style="line-height: 32px;">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- <el-button ic size="medium " @click="()=>{}">ä¿å</el-button> --> |
| | | <el-button icon="el-icon-refresh-lef" size="medium " style="background-color: cornflowerblue;" @click="goback">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-card style="margin: 10px;"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | label="项ç®" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="åä½" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="kk" |
| | | label="æ åå¼"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zz" |
| | | label="å
æ§å¼"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oo" |
| | | wight="200" |
| | | label="ç»éªäºº"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="黿æ"> |
| | | <el-option |
| | | v-for="item in cities" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | <span style="float: left">{{ item.label }}</span> |
| | | <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="pp" |
| | | label="å®éªè®¾å¤"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="æåæº"> |
| | | <el-option |
| | | v-for="item in cities" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | searchData:{ |
| | | from_time:'', |
| | | supplier:'', |
| | | mcode:'', |
| | | name:'', |
| | | specifications:'', |
| | | unit:'', |
| | | num:'', |
| | | userName:'', |
| | | end_time:'', |
| | | |
| | | }, |
| | | value:{}, |
| | | cities:[{ |
| | | value: 'Beijing', |
| | | label: 'é»å°æ' |
| | | }, { |
| | | value: 'Shanghai', |
| | | label: 'é»å°æ' |
| | | }, { |
| | | }], |
| | | tableData:[{ |
| | | date: '导线', |
| | | name: 'mm', |
| | | kk:'30.0', |
| | | zz:'30.0', |
| | | oo:'黿æ', |
| | | pp:'æåæº', |
| | | },{ |
| | | date: '导线', |
| | | name: 'mm', |
| | | kk:'30.0', |
| | | zz:'30.0', |
| | | oo:'黿æ', |
| | | pp:'æåæº', |
| | | },{ |
| | | date: '导线', |
| | | name: 'mm', |
| | | kk:'30.0', |
| | | zz:'30.0', |
| | | oo:'黿æ', |
| | | pp:'æåæº', |
| | | },{ |
| | | date: '导线', |
| | | name: 'mm', |
| | | kk:'30.0', |
| | | zz:'30.0', |
| | | oo:'黿æ', |
| | | pp:'æåæº', |
| | | },{ |
| | | date: '导线', |
| | | name: 'mm', |
| | | kk:'30.0', |
| | | zz:'30.0', |
| | | oo:'黿æ', |
| | | pp:'æåæº', |
| | | }], |
| | | currentPage:1, |
| | | pageSize:8, |
| | | id:'' |
| | | } |
| | | }, |
| | | created(){ |
| | | console.log(this.$route.query.icode); |
| | | this.id = this.$route.query.icode; |
| | | this.selectInspectsList() |
| | | }, |
| | | methods: { |
| | | async goback(){ |
| | | |
| | | this.$router.push({name:'inspectionApplication'}) |
| | | }, |
| | | async selectInspectsList() { |
| | | |
| | | // è·åå页å表 |
| | | const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage ,message:this.id}) |
| | | // this.inspectionTable = data |
| | | console.log(res) |
| | | |
| | | // res.data.forEach((item) => { |
| | | // var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] |
| | | // var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"] |
| | | // var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"] |
| | | // var checkdate = startTime + '~' + endTime |
| | | // var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"] |
| | | // item['formTime'] = formTime // æ¥ææ¥æ |
| | | // item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | // item['createTime'] = createTime // ç»è®°æ¥æ |
| | | // }) |
| | | this.searchData.mcode = res.data.row[0].mcode |
| | | this.searchData.supplier = res.data.row[0].supplier |
| | | this.searchData.from_time = res.data.row[0]["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] |
| | | this.searchData.name = res.data.row[0].name |
| | | this.searchData.specifications = res.data.row[0].specifications |
| | | this.searchData.unit = res.data.row[0].unit |
| | | this.searchData.num = res.data.row[0].num |
| | | this.searchData.end_time = res.data.row[0]["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"] |
| | | this.searchData.userName = res.data.row[0].userName |
| | | |
| | | |
| | | |
| | | |
| | | const data = res.data.row |
| | | data.forEach((item) => { |
| | | var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] |
| | | var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"] |
| | | var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"] |
| | | var checkdate = startTime + '~' + endTime |
| | | var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"] |
| | | item['formTime'] = formTime // æ¥ææ¥æ |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | item['createTime'] = createTime // ç»è®°æ¥æ |
| | | }) |
| | | this.inspectionTable = data |
| | | this.total = res.data.total |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
| | | |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small" >æäº¤</el-button> |
| | | <!-- <el-button type="text" size="small" >æäº¤</el-button> --> |
| | | <el-button type="text" size="small" >ä½åº</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-pagination |
| | | class="pagination" |
| | | :current-page="currentPage" |
| | | :page-sizes="[5, 10, 20, 30]" |
| | | :page-sizes="[1, 10, 20, 30]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- å¯¹è¯æ¡ --> |
| | | <div class="checkType"> |
| | | <el-dialog |
| | | title="æ°å¢æ£éªå" |
| | |
| | | > |
| | | <div class="check-box"> |
| | | <el-radio-group v-model="type" @change="handleRadioChange"> |
| | | <el-radio :label="0" border>åæææ£éª</el-radio> |
| | | <el-radio :label="0" border >åæææ£éª</el-radio> |
| | | <el-radio :label="1" border>å§ææ£éª</el-radio> |
| | | <el-radio :label="2" border>æåæ£éª</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.dateSurvey" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.dateSurvey" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.supplierName" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.supplierName" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææç¼ç ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialCoding" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialCoding" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialName" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialName" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.specificationsModels" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.specificationsModels" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.quantity" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.quantity" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.formTime" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.formTime" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.supplier" placeholder="请è¾å
¥å§æåä½" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.supplier" placeholder="请è¾å
¥å§æåä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="å§æç¼å·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.mcode" placeholder="请è¾å
¥æ ·åç¼å·" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.mcode" placeholder="请è¾å
¥æ ·åç¼å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="å§æåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.name" placeholder="请è¾å
¥æ ·ååç§°" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.name" placeholder="请è¾å
¥æ ·ååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.specifications" placeholder="请è¾å
¥åå·è§æ ¼" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.specifications" placeholder="请è¾å
¥åå·è§æ ¼" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.num" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.num" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.deliverydate" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.deliverydate" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.supplier" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.supplier" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææç¼ç ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.code" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.code" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.name" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.name" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.modelandspecification" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.modelandspecification" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.amount" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.amount" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | |
| | | type="selection" |
| | | label="" |
| | | min-width="10%" |
| | | /> |
| | | /> |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | |
| | | <el-button @click="commisionVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleCommisionSelection">ç¡® å®</el-button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <template v-else> |
| | | <router-view /> |
| | | |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments' |
| | | export default { |
| | |
| | | searchData: { |
| | | applicationnumber: '', |
| | | type: '', |
| | | state: '' |
| | | state: '', |
| | | }, |
| | | icode:'', |
| | | inspectionTable: [], |
| | | rawMaterialTable: [], |
| | | commisionTable: [{ |
| | |
| | | }], |
| | | currentPage: 1, |
| | | total: 20, // æ»æ¡æ° |
| | | pageSize: 5, // æ¯é¡µçæ°æ®æ¡æ° |
| | | pageSize: 8, // æ¯é¡µçæ°æ®æ¡æ° |
| | | radioValue: 'å
¨é¨', |
| | | checkTypeVisible: false, |
| | | type: '', // é»è®¤ä¸éä¸çç¶æ |
| | |
| | | if (this.$route.name === 'ForInspectionDetail') this.showDetail = true |
| | | }, |
| | | methods: { |
| | | async handleClick(row){ |
| | | // console.log(item); |
| | | // const res = await ddd({goodId:id}) |
| | | // this.$message({ |
| | | // message: 'æåä½ ï¼è¿æ¯ä¸æ¡æåæ¶æ¯', |
| | | // type: 'success' |
| | | // }); |
| | | |
| | | // console.log(res); |
| | | this.inspectionTable = row; |
| | | console.log(row.icode); |
| | | this.icode = row.icode |
| | | this.$router.push({name:'Viewdetails',query: {icode:row.icode}}); |
| | | this.selectInspectsList() |
| | | }, |
| | | async selectInspectsList() { |
| | | // è·åå页å表 |
| | | const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage }) |
| | | const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage,message:this.icode}) |
| | | // this.inspectionTable = data |
| | | // console.log(res.data.row) |
| | | const data = res.data.row |
| | |
| | | this.total = this.inspectionTable.length |
| | | }, |
| | | reset(){ |
| | | this.searchData = { |
| | | applicationnumber: '', |
| | | type: '', |
| | | state: '' |
| | | } |
| | | this.countSize = 1 |
| | | this.searchData = { } |
| | | // console.log('2222'); |
| | | this.selectInspectsList() |
| | | }, |
| | | //被éä¸çä¿¡æ¯ åé |
| | | //被éä¸çä¿¡æ¯ åé |
| | | handleSelectionChange(val) { |
| | | if (val.length > 1) { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.$refs.multipleTable.toggleRowSelection(val.pop()) |
| | | } |
| | | this.tmp = val[0] |
| | |
| | | this.rawmaterialVisible = false |
| | | }, |
| | | async handleRadioChange(){ |
| | | console.log(this.type) |
| | | if(this.type === 0){ |
| | | // åæææ¥æ£ |
| | | this.rawmaterialVisible = true |
| | | const res = await selectAll({type: this.type}) |
| | | var data = res.data |
| | | data.forEach((item)=>{ |
| | | var checkdate = [] |
| | | checkdate.push(item['createTime']) |
| | | checkdate.push(item['updateTime']) |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | }) |
| | | this.rawMaterialTable = data |
| | | // this.rawmaterialVisible = true |
| | | // const res = await selectAll({type: this.type}) |
| | | // var data = res.data |
| | | // data.forEach((item)=>{ |
| | | // var checkdate = [] |
| | | // checkdate.push(item['createTime']) |
| | | // checkdate.push(item['updateTime']) |
| | | // item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | // }) |
| | | this.$router.push({ name: 'ReportForInspection' }); |
| | | }else if(this.type === 1){ |
| | | this.commisionVisible = true |
| | | const res = await selectAll({type: this.type}) |
| | | var data = res.data |
| | | data.forEach((item)=>{ |
| | | var checkdate = [] |
| | | checkdate.push(item['startTime']) |
| | | checkdate.push(item['endTime']) |
| | | item['checkdate_'] = item['startTime'] + '~' + item['endTime'] |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | }) |
| | | this.commisionTable = res.data |
| | | // this.commisionVisible = true |
| | | // const res = await selectAll({type: this.type}) |
| | | // var data = res.data |
| | | // data.forEach((item)=>{ |
| | | // var checkdate = [] |
| | | // checkdate.push(item['startTime']) |
| | | // checkdate.push(item['endTime']) |
| | | // item['checkdate_'] = item['startTime'] + '~' + item['endTime'] |
| | | // item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | // }) |
| | | // this.commisionTable = res.data |
| | | this.$router.push({ name: 'CommissionInspection' }); |
| | | } |
| | | }, |
| | | // æ°å¢æ£éª |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | .checkType{ |
| | | .check-box{ |
| | |
| | | border-color: #b3d8ff; |
| | | ::v-deep .el-radio__label{ |
| | | color: #333 !important; |
| | | |
| | | |
| | | } |
| | | } |
| | | height: auto; |
| | |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | |
| | | .getDataBtn, .createBtn { |
| | | margin-left: 10px; /* Optional: Add some space between the buttons */ |
| | | } |
| | |
| | | <div class="content-main"> |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :rules="rules" :model="searchData" label-position="top"> |
| | | <el-form-item label="æ£æµæ¥æ:" class="sermargin" prop="date"> |
| | | <el-date-picker |
| | | v-model="searchData.date" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç±»å:" class="sermargin" prop="type"> |
| | | <el-select v-model="searchData.type" placeholder="å
¨é¨"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æåç»:"> |
| | | <el-button type="primary" icon="el-icon-plus" class="chooseMaterialBtn" >éæ©ç©æåç»</el-button> |
| | | </el-form-item> |
| | | <div class="rightBtn"> |
| | | <el-form-item> |
| | | <el-button type="primary" plain size="mini">æ¸
空</el-button> |
| | | <el-button type="primary" @click="search" size="mini">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <el-form-item label="æ£æµæ¥æ:" class="sermargin" prop="date"> |
| | | <el-date-picker v-model="searchData.date" type="daterange" range-separator="è³" start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç±»å:" class="sermargin" prop="type"> |
| | | <el-select v-model="searchData.type" placeholder="å
¨é¨"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¾åºå:"> |
| | | <el-select v-model="searchData.supplier" placeholder="å
¨é¨"> |
| | | <el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="rightBtn"> |
| | | <el-form-item> |
| | | <el-button type="primary" plain size="mini">æ¸
空</el-button> |
| | | <el-button type="primary" @click="search" size="mini">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="top-bar-copy"></div> |
| | | <div class="chart-content"> |
| | | <div class="qualified-wrapper"> |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">æ£æµæ¹æ¬¡åæ ¼çç»è®¡</div> |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">æ£æµæ ·ååæ ¼çç»è®¡</div> |
| | | <div class="qualified" ref="qualified"></div> |
| | | </div> |
| | | <div class="unqualified"> |
| | | <div class="firstBox-wrapper" > |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">ä¾åºåä¸åæ ¼æ¬¡æ°ç»è®¡</div> |
| | | <div class="firstBox" ref="unqualified_provider"></div> |
| | | </div> |
| | | <div class="secondBox-wrapper" > |
| | | <div class="firstBox-wrapper"> |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">ä¾åºåä¸åæ ¼æ¬¡æ°ç»è®¡</div> |
| | | <div class="firstBox" ref="unqualified_provider"></div> |
| | | </div> |
| | | <div class="secondBox-wrapper"> |
| | | <div class="secondBox_header"> |
| | | <div style="font-size:18px">ä¸åæ ¼é¡¹ç®ç»è®¡</div> |
| | | <el-radio-group v-model="type"> |
| | | <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value" >{{ item.label }}</el-radio-button> |
| | | <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value">{{ item.label |
| | | }}</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="secondBox" ref="unqualified_project"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="bottom"> |
| | | <el-button type="primary" size="mini" >æ°æ®å¯¼åº</el-button> |
| | | <el-button type="primary" size="mini">æ°æ®å¯¼åº</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // æ·»å æ»å¨çå¬äºä»¶ |
| | | window.addEventListener('scroll', function() { |
| | | window.addEventListener('scroll', function () { |
| | | var topBar = document.querySelector('.top-bar'); |
| | | var scrollTop = window.pageYOffset || document.documentElement.scrollTop; |
| | | |
| | |
| | | }) |
| | | |
| | | import * as echarts from 'echarts' |
| | | import { getSupplierList,getTestSampleStatistics,getSupplierNoPassStatistics,getNoPassProjectStatistics } from '@/api/experiment/passRateStatistics'; |
| | | import { dateFormat } from '../../../utils/dateUtil' |
| | | export default { |
| | | data(){ |
| | | data() { |
| | | return { |
| | | searchData:{ |
| | | supplier: [], |
| | | searchData: { |
| | | date: [], |
| | | type: 0, |
| | | group: '' |
| | | type: null, |
| | | supplier: null |
| | | }, |
| | | options:[ |
| | | options: [ |
| | | { |
| | | label: 'éè´å
¥åº', |
| | | label: 'åææ', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: 'xxxx', |
| | | label: 'æå', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'å§æå', |
| | | value: 2 |
| | | } |
| | | ], |
| | | radiooptions:[ |
| | | radiooptions: [ |
| | | { |
| | | label: 'ç¯å½¢é¥¼å¾', |
| | | value: 0 |
| | |
| | | ], |
| | | type: 0, |
| | | rules: { |
| | | date: [{required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur'}], |
| | | type: [{required: true, message: '请è¾å
¥åå', trigger: 'blur'}] |
| | | // date: [{ required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur' }], |
| | | // type: [{ required: true, message: '请è¾å
¥åå', trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getSupplierList() |
| | | this.getTestSampleStatistics() |
| | | this.getSupplierNoPassStatistics() |
| | | const chartDom_qualified = this.$refs.qualified; |
| | | const chartDom_unqualified_provider = this.$refs.unqualified_provider; |
| | | const chartDom_unqualified_project = this.$refs.unqualified_project; |
| | |
| | | const myChart2 = echarts.init(chartDom_unqualified_provider); |
| | | const myChart3 = echarts.init(chartDom_unqualified_project); |
| | | |
| | | /** |
| | | * æ£æµåæ ¼çç»è®¡ |
| | | */ |
| | | const option_qualified = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | } |
| | | ] |
| | | }; |
| | | const option_unqualified1 ={ |
| | | /** |
| | | * ä¾åºå |
| | | */ |
| | | const option_unqualified1 = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | }, |
| | | formatter: function(params) { |
| | | formatter: function (params) { |
| | | let tooltip = params[0].name + '<br/>'; |
| | | params.forEach(function(item) { |
| | | params.forEach(function (item) { |
| | | tooltip += item.marker + ' ' + item.seriesName + ': ' + item.value.toFixed(2) + '%<br/>'; // å°æ°æ®ä¿ç两ä½å°æ°å¹¶è½¬ä¸ºç¾åæ¯å½¢å¼ |
| | | }); |
| | | return tooltip; |
| | |
| | | data: ['ä¾åºå1', 'ä¾åºå2', 'ä¾åºå3', 'ä¾åºå4'] |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: '{value}%' |
| | | } |
| | | { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: '{value}%' |
| | | } |
| | | ], |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: 'åæ ¼æ°é', |
| | |
| | | } |
| | | ] |
| | | }; |
| | | /** |
| | | * ä¸åæ ¼é¡¹ç® |
| | | */ |
| | | const option_unqualified2 = { |
| | | legend: { |
| | | orient: 'vertical', |
| | |
| | | |
| | | myChart1.setOption(option_qualified); |
| | | myChart2.setOption(option_unqualified1); |
| | | if(this.type === 0){ |
| | | if (this.type === 0) { |
| | | myChart3.setOption(option_unqualified2); |
| | | } |
| | | if(this.type === 1){ |
| | | if (this.type === 1) { |
| | | myChart3.setOption(option_unqualified2); |
| | | } |
| | | }, |
| | | methods: { |
| | | search() { |
| | | this.getTestSampleStatistics() |
| | | }, |
| | | dateHandle(){ |
| | | let data=JSON.parse(JSON.stringify(this.searchData)) |
| | | if(this.searchData.date.length!=0&&this.searchData.date !=[]){ |
| | | data.beginDate=dateFormat(this.searchData.date[0]) |
| | | data.endDate=dateFormat(this.searchData.date[1]) |
| | | } |
| | | data.date=null |
| | | return data |
| | | }, |
| | | async getSupplierList() { |
| | | let res = await getSupplierList() |
| | | res.data.forEach(item => { |
| | | this.supplier.push({ label: item.supplier, value: item.supplier }) |
| | | }) |
| | | }, |
| | | getTestSampleStatistics(){ |
| | | let param= this.dateHandle() |
| | | let res =getTestSampleStatistics(param) |
| | | }, |
| | | getSupplierNoPassStatistics(){ |
| | | let param= this.dateHandle() |
| | | getSupplierNoPassStatistics(param) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content-main{ |
| | | height:100%; |
| | | .content-main { |
| | | height: 100%; |
| | | width: 100%; |
| | | .top-bar{ |
| | | |
| | | .top-bar { |
| | | position: absolute; |
| | | width: 99%; |
| | | top: 0; |
| | | left:0; |
| | | left: 0; |
| | | z-index: 999; |
| | | margin-top: 5px; |
| | | margin-left: 9.5px; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 5px 24px 0px 24px; |
| | | transition: position 0.3s ease; |
| | | .el-form{ |
| | | transition: position 0.3s ease; |
| | | |
| | | .el-form { |
| | | width: 100%; |
| | | .chooseMaterialBtn{ |
| | | |
| | | .chooseMaterialBtn { |
| | | background-color: #fff; |
| | | border-color: rgba(192,196,204,0.5); |
| | | border-color: rgba(192, 196, 204, 0.5); |
| | | color: gray; |
| | | width: 220px; |
| | | } |
| | | } |
| | | .sermargin{ |
| | | |
| | | .sermargin { |
| | | margin-right: 60px; |
| | | } |
| | | .rightBtn{ |
| | | display:flex; |
| | | justify-content:end; |
| | | |
| | | .rightBtn { |
| | | display: flex; |
| | | justify-content: end; |
| | | margin-right: 20px; |
| | | margin-top: -40px; |
| | | margin-bottom: -10px; |
| | | } |
| | | } |
| | | |
| | | .top-bar.fixed { |
| | | position: fixed; |
| | | top: 0.45rem; |
| | | left: 0.52rem; |
| | | width:93.8%; |
| | | width: 93.8%; |
| | | } |
| | | .top-bar-copy{ |
| | | |
| | | .top-bar-copy { |
| | | width: 100%; |
| | | height: 12vh; |
| | | } |
| | | .chart-content{ |
| | | |
| | | .chart-content { |
| | | margin: 0px -15px; |
| | | margin-bottom: 60px; |
| | | .qualified-wrapper{ |
| | | |
| | | .qualified-wrapper { |
| | | // margin-top: 14vh; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height:50vh; |
| | | height: 50vh; |
| | | } |
| | | .qualified{ |
| | | |
| | | .qualified { |
| | | width: 100%; |
| | | height: 400px; |
| | | } |
| | | .unqualified{ |
| | | |
| | | .unqualified { |
| | | margin-top: 10px; |
| | | height: 50vh; |
| | | display:flex; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .firstBox-wrapper{ |
| | | |
| | | .firstBox-wrapper { |
| | | background-color: #fff; |
| | | width:49%; |
| | | .firstBox{ |
| | | width: 49%; |
| | | |
| | | .firstBox { |
| | | width: 100%; |
| | | height: 40vh; |
| | | } |
| | | } |
| | | .secondBox-wrapper{ |
| | | background-color:#fff; |
| | | width:49%; |
| | | .secondBox_header{ |
| | | display:flex; |
| | | |
| | | .secondBox-wrapper { |
| | | background-color: #fff; |
| | | width: 49%; |
| | | |
| | | .secondBox_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 20px 20px; |
| | | } |
| | | .secondBox{ |
| | | |
| | | .secondBox { |
| | | width: 100%; |
| | | height: 40vh; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .bottom{ |
| | | |
| | | .bottom { |
| | | position: fixed; |
| | | width: 95%; |
| | | bottom: 0rem !important; |
| | |
| | | margin: 0px -15px; |
| | | padding: 20px 40px; |
| | | z-index: 999; |
| | | display:flex; |
| | | display: flex; |
| | | justify-content: end; |
| | | background-color: #fff; |
| | | } |
| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </el-form> |
| | | <el-form> |
| | | <el-button class="rightBtn" type="primary">å®¡æ ¸</el-button> |
| | | </el-form> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <div class="library-table"> |
| | | <div class="table-header"> |
| | | <div class="search-bar"> |
| | | <el-radio-group v-model="checkStatus" @change="handleRadioChange"> |
| | | <el-radio-button>å
¨é¨</el-radio-button> |
| | | <el-radio-button label="0">å¾
æäº¤</el-radio-button> |
| | | <el-radio-button label="2">å¾
éè¿</el-radio-button> |
| | | <el-radio-button label="0">å¾
éè¿</el-radio-button> |
| | | <el-radio-button label="2">éè¿</el-radio-button> |
| | | </el-radio-group> |
| | | <el-checkbox v-model="checked" style="margin-left: 20px" |
| | | >ä»
çæç</el-checkbox |
| | |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | <el-tag type="warning">{{ |
| | | scope.row.status == 0 ? "å¾
æäº¤" : "å¾
éè¿" |
| | | scope.row.status == 0 ? "å¾
éè¿" : "éè¿" |
| | | }}</el-tag> |
| | | </span> |
| | | </template></el-table-column |
| | |
| | | type="text" |
| | | size="small" |
| | | @click="handleClick(scope.row)" |
| | | >æ¥ç详ç»</el-button |
| | | > |
| | | >æ¥çè¯¦ç» |
| | | </el-button> |
| | | <el-button type="text" size="small" @click="checkskip = true">å®¡æ ¸</el-button> |
| | | |
| | | <el-dialog |
| | | title="åå§è®°å½å®¡æ ¸" |
| | | :visible.sync="checkskip" |
| | | width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="è¯·éæ©å®¡æ ¸ç»æ" :label-width="formLabelWidth"> |
| | | </el-form-item> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6" :offset="5"> |
| | | <!-- <el-button type="primary" style="background-color: rgb(208, 201, 192);">éå</el-button> --> |
| | | <el-button style="background-color: rgb(206, 211, 216);">éå</el-button> |
| | | </el-col> |
| | | <el-col :span="6" :offset="3"> |
| | | <!-- <el-button type="primary" style="background-color: rgb(181, 237, 125);">éè¿</el-button> --> |
| | | <el-button style="background-color: rgb(192, 236, 148);">éè¿</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="checkskip = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="checkskip= false">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | total: 0, |
| | | pageSize: 10, |
| | | checked: true, |
| | | checkskip: false, |
| | | form:{}, |
| | | handleClose:'', |
| | | formLabelWidth: '120px' |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.checkStatus = undefined; |
| | | this.getData(); |
| | | }, |
| | | //å®¡æ ¸è·³è½¬ |
| | | // checkskip() { |
| | | |
| | | // }, |
| | | // æ¥è¯¢å表 |
| | | async getData() { |
| | | const params = { |
| | |
| | | </el-col> |
| | | </div> |
| | | <el-dialog class="measureForm" title="计é" :visible.sync="dialogVisible"> |
| | | <el-form label-position="top" ref="upmeasureForm" :model="measureUpInfo"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ£å®æææ" prop="date" :rules="[{ required: true, message: 'è¯·éæ©æ£å®æææ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="measureUpInfo.date" type="daterange" range-separator="è³" start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¡®å®åº¦" prop="uncertainty" |
| | | :rules="[{ required: true, message: '请填åä¸ç¡®å®åº¦', trigger: 'blur' }]"> |
| | | <el-input placeholder="请填åä¸ç¡®å®åº¦" v-model="measureUpInfo.uncertainty" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»æ" prop="result" :rules="[{ required: true, message: 'è¯·éæ©ç»æ', trigger: 'change' }]"> |
| | | <el-select v-model="measureUpInfo.result" clearable filterable :allow-create="true" placeholder="è¯·éæ©ç»æ" |
| | | style="width:100%"> |
| | | <el-option v-for="item in result" :key="item.id" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ§è½ææ "> |
| | | <el-input v-model="measureUpInfo.performanceIndex" type="textarea" :rows="2" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="measureUpInfo.remarks" type="textarea" :rows="2" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label=""> |
| | | <el-upload class="upload-demo" action="#" :on-change="handleUpload" :auto-upload="false"> |
| | | <el-button size="small" type="primary">ç¹å»ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addMeasure">ç¡® å®</el-button> |
| | | <el-form label-position="top" ref="upmeasureForm" :model="measureUpInfo"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ£å®æææ" prop="date" |
| | | :rules="[{ required: true, message: 'è¯·éæ©æ£å®æææ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="measureUpInfo.date" type="date" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¡®å®åº¦" prop="uncertainty" |
| | | :rules="[{ required: true, message: '请填åä¸ç¡®å®åº¦', trigger: 'blur' }]"> |
| | | <el-input placeholder="请填åä¸ç¡®å®åº¦" v-model="measureUpInfo.uncertainty" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»æ" prop="result" :rules="[{ required: true, message: 'è¯·éæ©ç»æ', trigger: 'change' }]"> |
| | | <el-select v-model="measureUpInfo.result" clearable filterable :allow-create="true" placeholder="è¯·éæ©ç»æ" |
| | | style="width:100%"> |
| | | <el-option v-for="item in result" :key="item.id" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ§è½ææ "> |
| | | <el-input v-model="measureUpInfo.performanceIndex" type="textarea" :rows="2" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="measureUpInfo.remarks" type="textarea" :rows="2" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label=""> |
| | | <el-upload class="upload-demo" action="#" :on-change="handleUploadupdated" :auto-upload="false"> |
| | | <el-button size="small" type="primary">ç¹å»ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="upMeasure">ç¡® å®</el-button> |
| | | |
| | | <el-button @click="dialogVisible=false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest } from '@/api/laboratory/measure' |
| | | import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest, updateMetricalInformationInfo } from '@/api/laboratory/measure' |
| | | import { default as Add } from "./Add.vue"; |
| | | export default { |
| | | components: { |
| | |
| | | return { |
| | | dialogVisible: false, |
| | | tableIndex: null, |
| | | measureUpInfo:{ |
| | | measureUpInfo: { |
| | | id: null, |
| | | code: null, |
| | | result: null, |
| | | date: null, |
| | | uncertainty: null, |
| | | performanceIndex: null, |
| | | remarks: null, |
| | | file: null |
| | | file: null, |
| | | termValidity: null |
| | | }, |
| | | result: [{ |
| | | label: 'åæ ¼', |
| | |
| | | // this.getPlanPageList() |
| | | }, |
| | | methods: { |
| | | upResult(){ |
| | | this.measureData[this.tableIndex].result=this.resultUp |
| | | |
| | | upResult() { |
| | | this.measureData[this.tableIndex].result = this.resultUp |
| | | |
| | | }, |
| | | async upMeasure() { |
| | | let res = await updateMetricalInformationInfo(this.measureUpInfo) |
| | | if (res) { |
| | | this.$message({ |
| | | message: 'æä½æåï¼', |
| | | type: 'success' |
| | | }); |
| | | this.limitGetPlanMeasureInstrument() |
| | | this.dialogVisible = false |
| | | } |
| | | }, |
| | | handleUploadupdated() { |
| | | |
| | | }, |
| | | measureUp(scope) { |
| | | console.log(scope); |
| | | this.dialogVisible = true |
| | | this.tableIndex=scope.$index |
| | | this.measureUpInfo.result=scope.row.result |
| | | this.tableIndex = scope.$index |
| | | this.measureUpInfo.result = scope.row.result |
| | | this.measureUpInfo.code = scope.row.code |
| | | this.measureUpInfo.date = scope.row.endDate |
| | | this.measureUpInfo.id = scope.row.imId |
| | | this.measureUpInfo.uncertainty = scope.row.uncertainty |
| | | this.measureUpInfo.performanceIndex = scope.row.performanceIndex |
| | | this.measureUpInfo.remarks = scope.row.remarks |
| | | this.measureUpInfo.termValidity = scope.row.termValidity |
| | | }, |
| | | measureAdd() { |
| | | let add = this.$refs.add.add() |
| | |
| | | } |
| | | }, |
| | | async handleSizeChangePlan(num) { |
| | | console.log(num); |
| | | this.pageSizePlan = num |
| | | await this.limitGetPlanMeasureInstrument() |
| | | }, |
| | |
| | | currentPage: this.currentPagePlan, |
| | | pageSize: this.pageSizePlan |
| | | } |
| | | console.log(param); |
| | | let res = await limitGetPlanMeasureRequest(param) |
| | | this.totalPlan = res.data.taotal |
| | | this.measureData = res.data.list |
| | |
| | | }, |
| | | async getPlanAndInfoAndIns(id) { |
| | | let res = await getPlanMeasureInstrument({ "id": id, "currentPage": this.currentPagePlan, "pageSize": this.pageSize }); |
| | | console.log(res); |
| | | for (const key in res.data.list) { |
| | | this.planInfo[key] = res.data.list[key] |
| | | } |
| | |
| | | }, |
| | | blurSearch() { |
| | | if (this.radioValue === 1) { |
| | | console.log("计å"); |
| | | } |
| | | }, |
| | | handleClose() { |
| | |
| | | currentPage: this.currentPage, pageSize: this.pageSize, |
| | | code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit |
| | | } |
| | | console.log(param); |
| | | const res = await getStandingPageList(param) |
| | | this.measureLedgerTable = res.data.records |
| | | this.total = res.data.total |
| | |
| | | currentPage: this.currentPage, pageSize: this.pageSize, |
| | | code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit |
| | | } |
| | | console.log(param); |
| | | const res = await getPlanPageList(param) |
| | | res.data.list.forEach(item => { |
| | | item.palanDate = item.beginTime + " ~ " + item.endTime |
| | |
| | | this.total = res.data.total |
| | | }, |
| | | async lookMeasurement(code) { |
| | | console.log(code); |
| | | }, |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="standard-library-main"> |
| | | <div class="content-main"> |
| | | <div class="library-bom" style="width: 300px;"> |
| | | <el-input |
| | | v-model="filterText" |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | /> |
| | | <div class="library-bom" style="width: 300px"> |
| | | <el-input v-model="filterText" placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" /> |
| | | <el-button type="text">å
¨é¨</el-button> |
| | | <el-tree |
| | | ref="tree" |
| | | style="width: 100%;" |
| | | style="width: 100%" |
| | | class="filter-tree" |
| | | :data="standardTree" |
| | | :props="defaultProps" |
| | |
| | | @node-click="nodeClick" |
| | | /> |
| | | </div> |
| | | <div class="library-table" style="width: 80%;"> |
| | | <div class="library-table" style="width: 80%"> |
| | | <div class="table-header"> |
| | | <div class="search-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item> |
| | | <span>åææç¼ç ï¼</span> |
| | | <el-input |
| | | v-model="searchData.keyword" |
| | | placeholder="请è¾å
¥äººååç§°/åææåç§°" |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="filteredTableData">æ¥è¯¢</el-button> |
| | | <el-button type="primary" plain @click="resetBtn">éç½®</el-button> |
| | | <span>åææåç§°ï¼</span> |
| | | <el-input |
| | | v-model="searchData.keyword" |
| | | placeholder="请è¾å
¥åææåç§°" |
| | | > |
| | | <i slot="prefix" class="el-input__icon el-icon-search" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="filteredTableData" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button type="primary" plain @click="resetBtn" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="serve-btn"> |
| | | <el-button type="primary" icon="el-icon-plus" @click="addTreeFormVisible = true">æ°å¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="addTreeFormVisible = true" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button |
| | | class="top_div_button" |
| | | icon="el-icon-delete-solid" |
| | | size="small" |
| | | style="color: #00a5ff" |
| | | @click="deleteListClick" |
| | | >å é¤</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="table-box"> |
| | | <el-table |
| | | <!-- <el-table |
| | | ref="tableData" |
| | | row-key="id" |
| | | max-height="680" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :cell-style="{textAlign: 'left'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | :cell-style="{ textAlign: 'left' }" |
| | | :header-cell-style="{ |
| | | border: '0px', |
| | | background: '#f5f7fa', |
| | | color: '#606266', |
| | | boxShadow: 'inset 0 1px 0 #ebeef5', |
| | | textAlign: 'left', |
| | | }" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | width="100px" |
| | | > |
| | | <template v-if="scope.row.index+1" slot-scope="scope"> |
| | | {{ scope.row.index+1 }} |
| | | <el-table-column type="index" label="åºå·" width="100px"> |
| | | <template v-if="scope.row.index + 1" slot-scope="scope"> |
| | | {{ scope.row.index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="father" |
| | | label="åç§°" |
| | | width="320px" |
| | | > |
| | | <el-table-column prop="father" label="åç§°" width="320px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="mini" :type="scope.row.father? '':'success'" :style="{borderRadius: '40%',marginRight: '12px'}">{{ scope.row.father? '01':'02' }}</el-tag> {{ scope.row.father || scope.row.name }} |
| | | <el-tag |
| | | size="mini" |
| | | :type="scope.row.father ? '' : 'success'" |
| | | :style="{ borderRadius: '40%', marginRight: '12px' }" |
| | | >{{ scope.row.father ? "01" : "02" }}</el-tag |
| | | > |
| | | {{ scope.row.father || scope.row.name }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="300px" /> |
| | | <el-table-column prop="required" label="æ å" width="300px" /> |
| | | <el-table-column prop="internal" label="å
æ§å¶" width="300px" /> |
| | | </el-table> --> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%; margin-bottom: 20px" |
| | | row-key="name" |
| | | border |
| | | height="calc(100vh - 250px)" |
| | | default-expand-all |
| | | ref="multipleTable" |
| | | @select="selectTr" |
| | | @select-all="selectAll" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column type="selection" label="åºå·"> </el-table-column> |
| | | <el-table-column |
| | | type="index" |
| | | width="50px" |
| | | label="åºå·" |
| | | ></el-table-column> |
| | | <el-table-column label="项ç®åç§°" sortable> |
| | | <template scope="scope"> |
| | | <el-tag |
| | | ><div |
| | | class="firstDiv" |
| | | :style="`color: ${ |
| | | scope.row.code == '[1]' ? '#16a7ff' : '#58c173' |
| | | }`" |
| | | > |
| | | {{ scope.row.code == "[1]" ? "01" : "02" }} |
| | | </div> |
| | | <span style="color: black">{{ scope.row.name }}</span></el-tag |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | width="300px" |
| | | /> |
| | | <el-table-column |
| | | prop="required" |
| | | label="æ å" |
| | | width="300px" |
| | | /> |
| | | <el-table-column |
| | | prop="internal" |
| | | label="å
æ§å¶" |
| | | width="300px" |
| | | /> |
| | | sortable |
| | | ></el-table-column> |
| | | </el-table> |
| | | <!-- å¼¹åºè¡¨å页 --> |
| | | <div> |
| | |
| | | </div> |
| | | <div> |
| | | <!-- åé¡µå¨ --> |
| | | <el-pagination |
| | | <!-- <el-pagination |
| | | :current-page="pageParams.pageNo" |
| | | :page-sizes="[10, 15, 20, 25]" |
| | | :page-size="pageParams.pageSize" |
| | |
| | | :total="pageParams.total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | /> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog class="addTree" title="æ·»å ææ " width="28%" :visible.sync="addTreeFormVisible" @close="closeAddTreeForm"> |
| | | <el-dialog |
| | | class="addTree" |
| | | title="æ·»å ææ " |
| | | width="28%" |
| | | :visible.sync="addTreeFormVisible" |
| | | @close="closeAddTreeForm" |
| | | > |
| | | <el-form v-model="addTreeForm" label-position="top"> |
| | | <el-form-item label="ä¸çº§"> |
| | | <el-cascader |
| | | v-model="addTreeForm.addTypeArr" |
| | | :options="formTypeOptions" |
| | | :props="{ ...defaultProps,checkStrictly: true }" |
| | | :props="{ ...defaultProps, checkStrictly: true }" |
| | | clearable |
| | | @change="changeCascader" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-show="addTreeForm.addTypeArr.length<2" label="ç©æåç§°"> |
| | | <el-form-item |
| | | v-show="addTreeForm.addTypeArr.length < 2" |
| | | label="ç©æåç§°" |
| | | > |
| | | <el-input v-model="addTreeForm.materialName" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="addTreeForm.addTypeArr.length<3" label="æ§è¡æ å"> |
| | | <el-form-item |
| | | v-show="addTreeForm.addTypeArr.length < 3" |
| | | label="æ§è¡æ å" |
| | | > |
| | | <el-input v-model="addTreeForm.standardName" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="addTreeForm.addTypeArr.length<4" label="è§æ ¼åå·"> |
| | | <el-form-item |
| | | v-show="addTreeForm.addTypeArr.length < 4" |
| | | label="è§æ ¼åå·" |
| | | > |
| | | <el-input v-model="addTreeForm.specificationsName" /> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getMaterialList, getProductList, getProductSonList, |
| | | addMaterial, addStandards, addSpecifications |
| | | } from '@/api/standardLibrary' |
| | | import { |
| | | getMaterialList, |
| | | getProductList, |
| | | getProductSonList, |
| | | addMaterial, |
| | | addStandards, |
| | | addSpecifications, |
| | | deleteListApi, |
| | | } from "@/api/standardLibrary"; |
| | | |
| | | import { selectproductModelApi } from "@/api/basicData/index"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | deleteList: [], |
| | | addTreeFormVisible: false, |
| | | filterText: '', |
| | | filterText: "", |
| | | // æ ååºbomæ |
| | | standardTree: [], |
| | | // bomç,é»è®¤é
ç½®å¼ |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name', |
| | | value: 'id' |
| | | children: "children", |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | // æ¥è¯¢æ¡ä»¶ |
| | | searchData: { |
| | | keyword: '' |
| | | keyword: "", |
| | | }, |
| | | tableData: [ |
| | | ], |
| | | tableData: [], |
| | | oldtableData: [], |
| | | // å页忰 |
| | | pageParams: { |
| | | pageNo: 1, |
| | | pageSize: 12, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | tablespecifications: [ |
| | | ], |
| | | tablespecifications: [], |
| | | // éä¸çèç¹æ°æ® |
| | | selectData: {}, |
| | | formTypeOptions: [], |
| | | addTreeForm: { |
| | | addTypeArr: [] |
| | | } |
| | | } |
| | | addTypeArr: [], |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val) |
| | | } |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getStandardTree() |
| | | this.getStandardTree(); |
| | | }, |
| | | methods: { |
| | | filterNode(value, data) { |
| | | if (!value) return true |
| | | return data.label.indexOf(value) !== -1 |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | // è·åbomæ çæ åæ°æ® |
| | | async getStandardTree() { |
| | | const { data } = await getMaterialList() |
| | | console.log(data) |
| | | this.standardTree = data.map(item => { |
| | | let name = null |
| | | const { data } = await getMaterialList(); |
| | | console.log(data); |
| | | this.standardTree = data.map((item) => { |
| | | let name = null; |
| | | switch (item.type) { |
| | | case 1: |
| | | name = 'åææ' |
| | | break |
| | | name = "åææ"; |
| | | break; |
| | | case 2: |
| | | name = 'åæå' |
| | | break |
| | | name = "åæå"; |
| | | break; |
| | | case 3: |
| | | name = 'æå' |
| | | break |
| | | name = "æå"; |
| | | break; |
| | | } |
| | | return { |
| | | ...item, id: item.type, name |
| | | } |
| | | }) |
| | | console.log(this.standardTree) |
| | | ...item, |
| | | id: item.type, |
| | | name, |
| | | }; |
| | | }); |
| | | console.log(this.standardTree); |
| | | // formTypeOptions |
| | | // é»è®¤ç¬¬ä¸ä¸ªå级èç¹æç´¢ï¼æ°å¢é
置项 |
| | | const treeOptions = JSON.parse(JSON.stringify(this.standardTree)) |
| | | this.getDefault(treeOptions, 0) |
| | | console.log(treeOptions) |
| | | this.formTypeOptions = treeOptions |
| | | const treeOptions = JSON.parse(JSON.stringify(this.standardTree)); |
| | | this.getDefault(treeOptions, 0); |
| | | console.log(treeOptions); |
| | | this.formTypeOptions = treeOptions; |
| | | this.$nextTick().then(() => { |
| | | const firstNode = document.querySelector('.el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node') |
| | | firstNode.click() |
| | | const firstNode = document.querySelector( |
| | | ".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node" |
| | | ); |
| | | firstNode.click(); |
| | | // console.log(firstNode) |
| | | }) |
| | | }); |
| | | }, |
| | | getDefault(arr, index) { |
| | | for (const item of arr) { |
| | | if (item.children && item.children?.length > 0) { |
| | | // æåèç¹ |
| | | this.getDefault(item.children, index + 1) |
| | | // æåèç¹ |
| | | this.getDefault(item.children, index + 1); |
| | | if (index === 2) { |
| | | item.children = null |
| | | item.children = null; |
| | | } |
| | | } |
| | | // else { |
| | |
| | | // console.log('children' in data) |
| | | // æ¯åèç¹ |
| | | if (node.level === 4) { |
| | | // console.log(data, node) |
| | | console.log(data, node); |
| | | // åä¸éä¸èç¹ |
| | | this.selectData = data |
| | | this.selectData = data; |
| | | // eslint-disable-next-line prefer-const |
| | | this.getTableByClick(data) |
| | | this.getTableByClick(data); |
| | | } |
| | | if (!('children' in data)) { |
| | | return |
| | | if (!("children" in data)) { |
| | | return; |
| | | } |
| | | }, |
| | | async getTableByClick(data) { |
| | | // eslint-disable-next-line prefer-const |
| | | let { data: { row, total }} = await getProductList({ pageNo: this.pageParams.pageNo, pageSize: this.pageParams.pageSize, specificationsId: data.id }) |
| | | let { |
| | | data: { row, total }, |
| | | } = await getProductList({ |
| | | pageNo: this.pageParams.pageNo, |
| | | pageSize: this.pageParams.pageSize, |
| | | specificationsId: data.id, |
| | | }); |
| | | // console.log(row) |
| | | this.pageParams.total = total |
| | | row = row.map((item, index) => ({ ...item, index })) |
| | | this.pageParams.total = total; |
| | | row = row.map((item, index) => ({ ...item, index })); |
| | | for (const item of row) { |
| | | if (item.children) { |
| | | const res = await getProductSonList({ fatherName: item.father }) |
| | | item.children = res.data |
| | | item.id = item.father |
| | | const res = await getProductSonList({ fatherName: item.father }); |
| | | item.children = res.data; |
| | | item.id = item.father; |
| | | } |
| | | } |
| | | this.tableData = row |
| | | this.tableData = row; |
| | | }, |
| | | specificationDetails(row) { |
| | | // 跳转产åè§æ ¼è¯¦æ
页 |
| | | this.$router.push(`/standardLibrary/SpecificationDetails/${row.id}`) |
| | | this.$router.push(`/standardLibrary/SpecificationDetails/${row.id}`); |
| | | }, |
| | | handleSizeChange(val) { |
| | | console.log(`æ¯é¡µ ${val} æ¡`) |
| | | this.pageParams.pageSize = val |
| | | this.getTableByClick(this.selectData) |
| | | console.log(`æ¯é¡µ ${val} æ¡`); |
| | | this.pageParams.pageSize = val; |
| | | this.getTableByClick(this.selectData); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`å½å页: ${val}`) |
| | | this.pageParams.pageNo = val |
| | | this.getTableByClick(this.selectData) |
| | | console.log(`å½å页: ${val}`); |
| | | this.pageParams.pageNo = val; |
| | | this.getTableByClick(this.selectData); |
| | | }, |
| | | // æ¥è¯¢æé® |
| | | filteredTableData() { |
| | | this.oldtableData = this.tableData |
| | | this.oldtableData = this.tableData; |
| | | // æ ¹æ®è¾å
¥çå
³é®åå¾å°è¿æ»¤åçæ°æ®ï¼å¦ææå°±æè¿æ»¤åçæ°æ®å±ç¤ºå¨é¡µé¢ä¸ |
| | | const filteredtabledata = this.tableData.filter(item => { |
| | | return item.name.includes(this.searchData.keyword) |
| | | }) |
| | | const filteredtabledata = this.tableData.filter((item) => { |
| | | return item.name.includes(this.searchData.keyword); |
| | | }); |
| | | // console.log('filteredtabledata', filteredtabledata) |
| | | this.tableData = filteredtabledata |
| | | this.tableData = filteredtabledata; |
| | | }, |
| | | // éç½®æé® |
| | | resetBtn() { |
| | | this.searchData.keyword = '' |
| | | this.tableData = this.oldtableData |
| | | this.searchData.keyword = ""; |
| | | this.tableData = this.oldtableData; |
| | | }, |
| | | renderContent(h, { node, data, store }) { |
| | | // console.log('data', data) |
| | | // console.log('node', node) |
| | | // 夿æ¯å¦æ¯ç¶èç¹ææä»¶å¤¹ |
| | | const isFolder = ('children') in data |
| | | const isFolder = "children" in data; |
| | | return ( |
| | | <span class='tree-node'> |
| | | <span class="tree-node"> |
| | | {isFolder ? ( |
| | | <i |
| | | class={node.expanded ? 'el-icon-folder-opened blue-folder' : 'el-icon-folder blue-folder'} |
| | | class={ |
| | | node.expanded |
| | | ? "el-icon-folder-opened blue-folder" |
| | | : "el-icon-folder blue-folder" |
| | | } |
| | | ></i> |
| | | ) : ( |
| | | <i class='el-icon-document blue-folder'></i> |
| | | <i class="el-icon-document blue-folder"></i> |
| | | )} |
| | | <div class='tree-lable'>[{node.level}] {data.name}</div> |
| | | <div class="tree-lable"> |
| | | [{node.level}] {data.name} |
| | | </div> |
| | | </span> |
| | | ) |
| | | ); |
| | | }, |
| | | async subAddTreeForm() { |
| | | this.addTreeFormVisible = false |
| | | console.log(this.addTreeForm.addTypeArr.length) |
| | | let res = null |
| | | this.addTreeFormVisible = false; |
| | | console.log(this.addTreeForm.addTypeArr.length); |
| | | let res = null; |
| | | try { |
| | | switch (this.addTreeForm.addTypeArr.length) { |
| | | case 1: |
| | | console.log(this.addTreeForm) |
| | | res = await addMaterial({ ...this.addTreeForm, type: this.addTreeForm.addTypeArr.pop() }) |
| | | break |
| | | console.log(this.addTreeForm); |
| | | res = await addMaterial({ |
| | | ...this.addTreeForm, |
| | | type: this.addTreeForm.addTypeArr.pop(), |
| | | }); |
| | | break; |
| | | case 2: |
| | | console.log(this.addTreeForm) |
| | | res = await addStandards({ ...this.addTreeForm, materialId: this.addTreeForm.addTypeArr.pop() }) |
| | | break |
| | | console.log(this.addTreeForm); |
| | | res = await addStandards({ |
| | | ...this.addTreeForm, |
| | | materialId: this.addTreeForm.addTypeArr.pop(), |
| | | }); |
| | | break; |
| | | case 3: |
| | | console.log(this.addTreeForm) |
| | | res = await addSpecifications({ ...this.addTreeForm, standardId: this.addTreeForm.addTypeArr.pop() }) |
| | | break |
| | | console.log(this.addTreeForm); |
| | | res = await addSpecifications({ |
| | | ...this.addTreeForm, |
| | | standardId: this.addTreeForm.addTypeArr.pop(), |
| | | }); |
| | | break; |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('æ·»å 失败') |
| | | this.$message.error("æ·»å 失败"); |
| | | } |
| | | |
| | | console.log(res) |
| | | this.$message.success('æ·»å æå') |
| | | this.addTreeForm = {} |
| | | this.getStandardTree() |
| | | this.getTableByClick(this.selectData) |
| | | console.log(res); |
| | | this.$message.success("æ·»å æå"); |
| | | this.addTreeForm = {}; |
| | | this.getStandardTree(); |
| | | this.getTableByClick(this.selectData); |
| | | }, |
| | | changeCascader(data) { |
| | | console.log(data) |
| | | this.addTreeForm.addTypeArr = data |
| | | console.log(data); |
| | | this.addTreeForm.addTypeArr = data; |
| | | }, |
| | | closeAddTreeForm() { |
| | | this.addTreeForm = { |
| | | addTypeArr: [] |
| | | } |
| | | console.log(this.addTreeForm) |
| | | } |
| | | addTypeArr: [], |
| | | }; |
| | | console.log(this.addTreeForm); |
| | | }, |
| | | /** è¡¨æ ¼æè¡ç¹å»äºä»¶ */ |
| | | // handleRowClick(row, column, event) { |
| | | // // 夿å½åè¡æ¯å¦æåéï¼è¥æ²¡æåç»æå¤ç |
| | |
| | | // if (!row.children) return |
| | | // this.$refs.tableData.toggleRowExpansion(row) |
| | | // } |
| | | } |
| | | } |
| | | selectProductModelTable() { |
| | | selectproductModelApi(this.params).then((res) => { |
| | | res.data.forEach((i) => { |
| | | if (i.name === undefined) { |
| | | i.name = i.children[0].name; |
| | | i.unit = i.children[0].unit; |
| | | i.id = i.children[0].id; |
| | | i.edit = true; |
| | | delete i.children; |
| | | } |
| | | }); |
| | | this.tableData = res.data; |
| | | this.selectDataList(); |
| | | }); |
| | | }, |
| | | selectDataList() { |
| | | this.tableData.forEach((a) => { |
| | | a.code = "[1]"; |
| | | if (a.children != undefined) { |
| | | a.children.forEach((b) => { |
| | | b.code = "[2]"; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | // èªå®ä¹ |
| | | if (this.isAllSelect) { |
| | | val.forEach((i) => { |
| | | let isExist = false; |
| | | this.deleteList.findIndex((c) => { |
| | | if (c === i.id) { |
| | | isExist = true; |
| | | } |
| | | }); |
| | | if (!isExist && i.id !== undefined) { |
| | | this.deleteList.push(i.id); |
| | | } |
| | | }); |
| | | } else { |
| | | this.deleteList.splice(0, this.deleteList.length); |
| | | } |
| | | // èªå®ä¹ç»æ |
| | | }, |
| | | //éæ©æè¡ |
| | | selectTr(selection, row) { |
| | | this.$set(row, "isChecked", !row.isChecked); |
| | | this.$nextTick(() => { |
| | | this.isAllSelect = row.isChecked; |
| | | this.toggleSelect(row, row.isChecked, "tr"); |
| | | }); |
| | | |
| | | if (row.isChecked === true) { |
| | | if (row.children !== undefined) { |
| | | row.children.forEach((i) => { |
| | | this.deleteList.push(i.id); |
| | | }); |
| | | } else { |
| | | this.deleteList.push(row.id); |
| | | } |
| | | } else if (row.isChecked === false) { |
| | | if (row.children !== undefined) { |
| | | row.children.forEach((i) => { |
| | | this.deleteList.findIndex((c, index) => { |
| | | if (c === i.id) { |
| | | this.deleteList.splice(index, 1); |
| | | return; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | this.deleteList.findIndex((c, index) => { |
| | | if (c === row.id) { |
| | | this.deleteList.splice(index, 1); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //éå½å级 |
| | | toggleSelect(data, flag, type) { |
| | | if (type === "all") { |
| | | if (data.length > 0) { |
| | | data.forEach((item) => { |
| | | this.toggleSelection(item, flag); |
| | | if (item.children && item.children.length > 0) { |
| | | this.toggleSelect(item.children, flag, type); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | if (data.children && data.children.length > 0) { |
| | | data.children.forEach((item) => { |
| | | item.isChecked = !item.isChecked; |
| | | this.$refs.multipleTable.toggleRowSelection(item, flag); |
| | | this.toggleSelect(item, flag, type); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | deleteListClick() { |
| | | deleteListApi(this.deleteList).then((res) => { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.selectProductModelTable(); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | // el-tableè¡¨æ ¼å¯¹é½ |
| | | ::v-deep .el-table__row:not([class*="el-table__row--level-"]) { |
| | | td:nth-child(2){ |
| | | td:nth-child(2) { |
| | | padding-left: 23px !important; |
| | | } |
| | | } |
| | |
| | | // width: 1000px; |
| | | // height: 800px; |
| | | // } |
| | | .standard-library-main{ |
| | | .standard-library-main { |
| | | width: 100vh; |
| | | height: 100%; |
| | | // 页é¢ä¸å¿å
容åºå |
| | | .content-main{ |
| | | // 页é¢ä¸å¿å
容åºå |
| | | .content-main { |
| | | display: flex; |
| | | height: 100%; |
| | | min-height: calc(100vh - 88px); |
| | | max-height: calc(100vh - 88px); |
| | | padding: 15px; |
| | | >div{ |
| | | > div { |
| | | padding: 20px; |
| | | background: #fff; |
| | | } |
| | | .library-bom{ |
| | | .library-bom { |
| | | // padding-right: 10px; |
| | | width: 300px; |
| | | // height: 100%; |
| | | max-height: 100%; |
| | | height: 100%; |
| | | // max-height: 100%; |
| | | // margin-right: 12px; |
| | | // overflow-y: scroll; |
| | | .el-tree { |
| | | // margin-top: |
| | | // margin-top: |
| | | width: 100%; |
| | | ::v-deep .el-tree-node__content{ |
| | | overflow: scroll; |
| | | ::v-deep .el-tree-node__content { |
| | | height: 24px !important; |
| | | font-size: 18px; |
| | | // display: inline-block !important; |
| | | padding: 2px; |
| | | // color: #333; |
| | | .tree-node{ |
| | | .tree-node { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 20px; |
| | | } |
| | | .tree-lable{ |
| | | .tree-lable { |
| | | height: 100%; |
| | | line-height: 23px; |
| | | font-size: 12px; |
| | | padding-left: 8px; |
| | | } |
| | | .blue-folder{ |
| | | color: rgb(64, 158, 255) |
| | | .blue-folder { |
| | | color: rgb(64, 158, 255); |
| | | } |
| | | } |
| | | } |
| | |
| | | // } |
| | | // } |
| | | } |
| | | .library-table{ |
| | | .library-table { |
| | | // height: 100%; |
| | | width: 170vh; |
| | | max-height: 100%; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | // overflow-y: scroll; |
| | | .table-header{ |
| | | .table-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .el-form-item{ |
| | | .el-form-item { |
| | | margin-bottom: 30px !important; |
| | | } |
| | | } |
| | | .table-box{ |
| | | flex: 1; |
| | | background: #fff; |
| | | // padding: 20px 20px 10px 20px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | .table-box { |
| | | flex: 1; |
| | | background: #fff; |
| | | // padding: 20px 20px 10px 20px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | |
| | | .el-table { |
| | | // flex: 1; |
| | | // max-height: 680px; |
| | | // overflow-y: scroll; |
| | | } |
| | | >div:nth-child(3){ |
| | | // height: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | margin: 10px 0; |
| | | } |
| | | .el-table { |
| | | // flex: 1; |
| | | // max-height: 680px; |
| | | // overflow-y: scroll; |
| | | } |
| | | > div:nth-child(3) { |
| | | // height: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | margin: 10px 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .addTree{ |
| | | .el-form-item{ |
| | | .addTree { |
| | | .el-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | .el-cascader{ |
| | | .el-cascader { |
| | | width: 100%; |
| | | } |
| | | } |