|
@@ -27,19 +27,19 @@
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
<HcTooltip keys="tentative_device_approach_edit">
|
|
|
- <el-button hc-btn @click="editFormModalClick">
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="editFormModalClick">
|
|
|
<HcIcon name="edit"/>
|
|
|
<span>编辑</span>
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
<HcTooltip keys="tentative_device_approach_del">
|
|
|
- <el-button hc-btn @click="delNodeModalClick">
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delNodeModalClick">
|
|
|
<HcIcon name="delete-bin-2"/>
|
|
|
<span>删除</span>
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
<HcTooltip keys="tentative_device_approach_printer">
|
|
|
- <el-button hc-btn>
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0">
|
|
|
<HcIcon name="printer"/>
|
|
|
<span>打印</span>
|
|
|
</el-button>
|
|
@@ -206,7 +206,6 @@ import approachApi from "~api/tentative/device/approach";
|
|
|
import {formValidate, getArrValue} from "vue-utils-plus"
|
|
|
import samplingApi from "~api/tentative/material/sampling";
|
|
|
import {getContractUserList} from "~api/other";
|
|
|
-//import {getDictionary} from "~api/other";
|
|
|
|
|
|
//初始变量
|
|
|
const useAppState = useAppStore()
|
|
@@ -329,23 +328,23 @@ const pageChange = ({current, size}) => {
|
|
|
//表格数据
|
|
|
const tableRef = ref(null)
|
|
|
const tableColumn = ref([
|
|
|
- {key:'deviceName', name: '设备名称'},
|
|
|
- {key:'deviceClassName', name: '设备分类'},
|
|
|
- {key:'deviceNumber', name: '设备编号'},
|
|
|
- {key:'deviceModel', name: '设备型号'},
|
|
|
- {key:'manufacturer', name: '生产厂家'},
|
|
|
- {key:'factoryDate', name: '出厂日期'},
|
|
|
- {key:'factoryNumber', name: '出厂编号'},
|
|
|
- {key:'mobilizationDate', name: '进场日期'},
|
|
|
- {key:'measuringRange', name: '测量范围'},
|
|
|
- {key:'accuracy', name: '精准度'},
|
|
|
- {key:'calibrationCycle', name: '校准周期(月)'},
|
|
|
- {key:'lastCalibrationTime', name: '最近效验时间'},
|
|
|
- {key:'status', name: '状态'},
|
|
|
- {key:'isCalibration', name: '是否需要效验'},
|
|
|
- {key:'equipmentAcquisitionNumber', name: '设备采集编号'},
|
|
|
- {key:'managerName', name: '设备管理人员'},
|
|
|
- {key:'remarks', name: '备注'},
|
|
|
+ {key:'deviceName', name: '设备名称', width: '200'},
|
|
|
+ {key:'deviceClassName', name: '设备分类', width: '160'},
|
|
|
+ {key:'deviceNumber', name: '设备编号', width: '160'},
|
|
|
+ {key:'deviceModel', name: '设备型号', width: '180'},
|
|
|
+ {key:'manufacturer', name: '生产厂家', width: '200'},
|
|
|
+ {key:'factoryDate', name: '出厂日期', width: '160'},
|
|
|
+ {key:'factoryNumber', name: '出厂编号', width: '160'},
|
|
|
+ {key:'mobilizationDate', name: '进场日期', width: '160'},
|
|
|
+ {key:'measuringRange', name: '测量范围', width: '120'},
|
|
|
+ {key:'accuracy', name: '精准度', width: '120'},
|
|
|
+ {key:'calibrationCycle', name: '校准周期(月)', width: '120'},
|
|
|
+ {key:'lastCalibrationTime', name: '最近效验时间', width: '160'},
|
|
|
+ {key:'status', name: '状态', width: '100'},
|
|
|
+ {key:'isCalibration', name: '是否需要效验', width: '100'},
|
|
|
+ {key:'equipmentAcquisitionNumber', name: '设备采集编号', width: '160'},
|
|
|
+ {key:'managerName', name: '设备管理人员', width: '120'},
|
|
|
+ {key:'remarks', name: '备注', width: '160'},
|
|
|
])
|
|
|
const tableData = ref([])
|
|
|
|
|
@@ -377,7 +376,6 @@ const tableSelection = (rows) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//新增/编辑 分类
|
|
|
const addEditNodeFormRef = ref(null)
|
|
|
const addEditNodeFormModal = ref(false)
|
|
@@ -455,7 +453,6 @@ const setClassRemove = async (id) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//导入
|
|
|
const importModal = ref(false)
|
|
|
const importModalClick = () => {
|
|
@@ -515,7 +512,13 @@ const addFormModalClick = () => {
|
|
|
|
|
|
//编辑 设备信息
|
|
|
const editFormModalClick = () => {
|
|
|
- addEditFormModal.value = true
|
|
|
+ const keys = tableCheckedKeys.value
|
|
|
+ if (keys.length === 1) {
|
|
|
+ addEditFormModel.value = keys[0]
|
|
|
+ addEditFormModal.value = true
|
|
|
+ } else if (keys.length > 1) {
|
|
|
+ window?.$message?.warning('只能选择一条数据编辑')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//关闭新增/编辑的弹窗
|