| | |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .el-cascader-menu__wrap{ |
| | | height: 300px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | selectStandardProductList: "/standardTree/selectStandardProductList", //通过标准树查询对应的检验项目 |
| | | selectStandardProductListByMethodId: "/standardTree/selectStandardProductListByMethodId", //通过检验标准查询检验项目 |
| | | selectStandardMethodEnum: "/standardTree/selectStandardMethodEnum", //获取标准树下标准方法枚举 |
| | | getStandardTree2: "/standardTree/getStandardTree2", //获取产品架构 |
| | | } |
| | | |
| | | const standardMethod = { |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | .handleBtn.is-disabled .el-upload:focus { |
| | | .value-table .handleBtn.is-disabled .el-upload:focus { |
| | | color: #C0C4CC !important; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload { |
| | | .value-table .avatar-uploader .el-upload { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="编辑" :visible.sync="upDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body> |
| | | <div class="body" v-if="upDia" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;"> |
| | | <div class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;"> |
| | | <div v-if="data.row > 1"> |
| | | <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;"> |
| | | <el-col :span="6/data.row" style="text-align: right;" :offset="1"> |
| | |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | <el-cascader :value="upData[a.label]" :options="data.cascaderField[a.label].tree" |
| | | <el-cascader :value="upData[a.label]" :options="data.cascaderField[a.label].tree" :show-all-levels="false" |
| | | v-if="showCascader(a.label)" :placeholder="`请选择${a.value}`" clearable |
| | | :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable></el-cascader> |
| | |
| | | </el-upload> |
| | | <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable |
| | | :placeholder="`请选择${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable></el-cascader> |
| | | @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | |
| | | </el-upload> |
| | | <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable |
| | | :placeholder="`请选择${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable></el-cascader> |
| | | @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | ], |
| | | param: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | tableData: { |
| | | deep: true, |
| | | handler: function() { |
| | | this.$nextTick(() => { |
| | | this.$refs.eltable.doLayout() |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | |
| | | else if (val.method == 'doDiy') { |
| | | if (val.id == 'update') { |
| | | this.upDia = true, |
| | | this.upData = this.HaveJson(row) |
| | | this.upData = this.HaveJson(row) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | |
| | | props:{ |
| | | value:'name', |
| | | label:'name', |
| | | checkStrictly: true |
| | | checkStrictly: true, |
| | | multiple: true |
| | | } |
| | | }, |
| | | requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', |
| | |
| | | if (this.radio === '0') { |
| | | this.showItemParameter = true; |
| | | this.showTestObject = false; |
| | | this.selectTestObjectByName() |
| | | /* this.$nextTick(() => { |
| | | this.$refs.itemParameterTable.selectList() |
| | | }) */ |
| | |
| | | refreshTable() { |
| | | if (this.radio === '0') { |
| | | this.$refs['itemParameterTable'].selectList() |
| | | |
| | | } else { |
| | | this.$refs['testObjectTable'].selectList() |
| | | } |
| | |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field: ['sampleType', 'createUserName', 'updateUserName', '检验对象=structureTestObjectId'] |
| | | field: ['createUserName', 'updateUserName'] |
| | | }, { |
| | | id: 'delete', |
| | | font: '删除', |
| | |
| | | method: 'doDiy' |
| | | }], |
| | | tagField: { |
| | | structureTestObjectId: { |
| | | select: [] |
| | | }, |
| | | isProduct: { |
| | | select: [{ |
| | | value: 0, |
| | |
| | | label: '是' |
| | | }] |
| | | }, |
| | | qualificationId:{ |
| | | qualificationId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | selectField: { |
| | | structureTestObjectId: { |
| | | select: [] |
| | | }, |
| | | isProduct: { |
| | | select: [{ |
| | | value: 0, |
| | |
| | | label: '是' |
| | | }] |
| | | }, |
| | | qualificationId:{ |
| | | qualificationId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn'], |
| | | requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn'] |
| | | cascaderField: { |
| | | structureTestObjectId: { |
| | | tree: [] |
| | | }, |
| | | // 字段配置 |
| | | props: { |
| | | value: 'value', |
| | | label: 'label', |
| | | checkStrictly: true, |
| | | multiple: true |
| | | }, |
| | | }, |
| | | requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'], |
| | | requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | this.selectTestObjectByName() |
| | | this.getQualificationList() |
| | | this.selectTestObjectByName() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | this.selectTestObjectByName() |
| | | }, |
| | | refresh() { |
| | | this.selectTestObjectByName() |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | }, |
| | |
| | | openAdd() { |
| | | this.$refs.ValueTable.openAddDia(this.$api.standardMethod.addStandardMethod); |
| | | }, |
| | | selectTestObjectByName() { |
| | | this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.specimenName, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.selectField.structureTestObjectId.select = data |
| | | this.componentData.tagField.structureTestObjectId.select = data |
| | | }) |
| | | }, |
| | | getQualificationList(){ |
| | | getQualificationList() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "资质名称" |
| | | }).then(res => { |
| | | let list = res.data |
| | | category: "资质名称" |
| | | }).then(res => { |
| | | let list = res.data |
| | | this.componentData.selectField.qualificationId.select = list |
| | | this.componentData.tagField.qualificationId.select = list |
| | | }) |
| | | }) |
| | | // this.$axios.post(this.$api.certification.getCertificationDetail,{ |
| | | // page: { |
| | | // current: -1, |
| | |
| | | // this.componentData.tagField.qualificationId.select = list |
| | | // } |
| | | // }) |
| | | } |
| | | }, |
| | | selectTestObjectByName() { |
| | | this.$axios.get(this.$api.standardTree.getStandardTree2).then(res => { |
| | | res.data.forEach(a => { |
| | | this.cascaderFieldData(a) |
| | | }) |
| | | this.componentData.cascaderField.structureTestObjectId.tree = res.data |
| | | }) |
| | | }, |
| | | cascaderFieldData(val) { |
| | | if (val.children === undefined) { |
| | | return |
| | | } else if (val.children.length == 0) { |
| | | delete val.children |
| | | } else { |
| | | val.children.forEach(a => { |
| | | this.cascaderFieldData(a) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </el-row> |
| | | <el-row class="standard_table" v-loading="tableLoad"> |
| | | <el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark" |
| | | highlight-current-row @row-click="rowClick" ref="standard" :key="Math.random()"> |
| | | :highlight-current-row="true" @row-click="rowClick" ref="standard"> |
| | | <el-table-column prop="code" label="标准编号" show-overflow-tooltip width="180"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span> |
| | |
| | | rowClick(row, column, event) { |
| | | this.tableLoad2 = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, { |
| | | id: row.id |
| | | id: row.id, |
| | | tree: this.selectTree |
| | | }).then(res => { |
| | | this.productList = res.data |
| | | setTimeout(() => { |
| | |
| | | <el-col :span="24"> |
| | | <el-card :body-style="{padding: '6px'}"> |
| | | <ul> |
| | | <li @click="removeTab(activeIndex)"><i class="el-icon-close"></i>关闭</li> |
| | | <li @click="removeTab(activeIndex)" v-show="menuId!=0"><i class="el-icon-close"></i>关闭</li> |
| | | <li @click="allDel"><i class="el-icon-delete"></i>关闭所有</li> |
| | | <li @click="rightDel(activeIndex)"><i class="el-icon-d-arrow-right"></i>关闭右侧页签</li> |
| | | <el-divider></el-divider> |
| | |
| | | query:{}, |
| | | newMsg:false, |
| | | timer:null, |
| | | menuId: 0 |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.timer&&clearInterval(this.timer); |
| | | this.timer = setInterval(()=>{ |
| | | this.checkForUnreadData() |
| | | },20000) |
| | | },30000) |
| | | }, |
| | | methods: { |
| | | saveClick(){ |
| | |
| | | }, |
| | | // 右键菜单 |
| | | rightKeyMenu(id, e) { |
| | | if (id == 0) return |
| | | // if (id == 0) return |
| | | this.menuId = id |
| | | this.activeIndex = id |
| | | var x = e.clientX + 'px' |
| | | var y = e.clientY + 'px' |