菜单管理
This commit is contained in:
@@ -25,7 +25,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label='设备模式' prop='pattern' :label-width="100">
|
||||
<el-input v-model='formContent.pattern' disabled/>
|
||||
<el-select v-model="formContent.pattern" clearable placeholder="请选择设备模式" disabled>
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Pattern')"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -382,12 +389,17 @@ const disabledDate = (time: Date) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 打开弹窗,可能是新增,也可能是编辑
|
||||
const open = (sign: string, data: Device.ResPqDev) => {
|
||||
titleType.value = sign
|
||||
dialogVisible.value = true
|
||||
|
||||
if(data.pattern ==='比对式'){
|
||||
const patternItem = dictStore.getDictData('Pattern').find(item => item.id === data.pattern)
|
||||
if( patternItem && patternItem.name ==='比对式'){
|
||||
DevIsShow.value = false
|
||||
MonIsShow.value = true
|
||||
}else{
|
||||
|
||||
@@ -41,7 +41,7 @@ import { CirclePlus, Delete, EditPen, Download, Upload } from '@element-plus/ico
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev } from '@/api/device/device/index.ts'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
// ProTable 实例
|
||||
@@ -134,6 +134,8 @@ const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||
devicePopup.value?.open(titleType, row)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 批量删除设备
|
||||
const batchDelete = async (id: string[]) => {
|
||||
await useHandleData(deletePqDev, id, '删除所选设备')
|
||||
|
||||
@@ -29,24 +29,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='tsx' name='useRole'>
|
||||
import { TestScript } from '@/api/device/interface/testScript'
|
||||
import { type TestScript } from '@/api/device/interface/testScript'
|
||||
import { useHandleData } from '@/hooks/useHandleData'
|
||||
import { useDownload } from '@/hooks/useDownload'
|
||||
import { useAuthButtons } from '@/hooks/useAuthButtons'
|
||||
import ProTable from '@/components/ProTable/index.vue'
|
||||
import ImportExcel from '@/components/ImportExcel/index.vue'
|
||||
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
||||
|
||||
import type{ ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
||||
import { CirclePlus, Delete, EditPen, Share, Download, Upload, View, Refresh } from '@element-plus/icons-vue'
|
||||
import testScriptDataList from '@/api/device/testScript/testScriptData'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import {
|
||||
getTestScriptList,
|
||||
} from '@/api/device/testScript/testScript'
|
||||
} from '@/api/device/testScript/index'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
|
||||
// const testScriptData = testScriptDataList
|
||||
|
||||
// ProTable 实例
|
||||
const proTable = ref<ProTableInstance>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user