feat: 添加vue-qrcode-reader依赖并优化二维码扫描功能
refactor: 移除未使用的ElMessageBox导入 feat: 新增BaseFullScreen全屏组件 feat: 新增字典工具函数useDict和getOneDict fix: 修复设备类型和设备表单配置页面的图标和字典引用问题 feat: 新增ImportData数据导入组件 style: 统一设备账户页面的按钮文本和步骤标题
This commit is contained in:
@@ -117,14 +117,12 @@ import {
|
||||
updateTaskStatus,
|
||||
setTaskEndTime
|
||||
} from '@/api/deviceManagement/devicetaskexecute.js'
|
||||
import { QrStream } from 'vue3-qr-reader'
|
||||
import { QrStream } from 'vue-qrcode-reader'
|
||||
|
||||
// Vue2中不存在vue3-qr-reader,需要移除或提供替代方案
|
||||
export default {
|
||||
name: 'TheTaskExecuteDeviceItemStep',
|
||||
components: {
|
||||
// 注意:Vue2中没有vue3-qr-reader组件,需要提供替代方案
|
||||
// QrStream
|
||||
QrStream
|
||||
},
|
||||
props: {
|
||||
// 设备信息
|
||||
@@ -197,7 +195,6 @@ export default {
|
||||
close() {
|
||||
this.$emit('doClose', false)
|
||||
},
|
||||
|
||||
over() {
|
||||
this.$confirm('是否确认此任务已完成?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { AchieveTaskbindDevice } from '@/api/deviceManagement/devicetaskexecute.js'
|
||||
import { default as TheTaskExecuteDeviceItemStep } from './TheTaskExecuteDeviceItemStep'
|
||||
// import { default as TheTaskExecuteTable } from './TheTaskExecuteTable' 暂不使用
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
|
||||
export default {
|
||||
name: 'TheTaskExecuteFormDialog',
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { default as TheDeviceInspectTable } from './TheDeviceInspectTable'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="15" class="mb10">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['deviceManagement:deviceaccount:add']" plain icon="el-icon-plus" @click="handleAdd">
|
||||
{{ $t('btn.add') }}
|
||||
新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
@@ -175,10 +175,9 @@
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<!-- 按步骤填写数据 -->
|
||||
<el-steps style="margin-bottom: 10px" :active="stepsActive" process-status="process" finish-status="success" :simple="true">
|
||||
<el-step :title="$t('steps.000')" />
|
||||
<el-step :title="$t('steps.001')" />
|
||||
<!-- <el-step :title="$t('steps.002')" /> -->
|
||||
</el-steps>
|
||||
<el-step title="基本信息" />
|
||||
<el-step title="文件上传" />
|
||||
</el-steps>
|
||||
<el-row :gutter="20">
|
||||
<!-- 步骤1填写 -->
|
||||
<template v-if="stepsActive === 0">
|
||||
@@ -270,10 +269,10 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" v-if="opertype != 3">
|
||||
<el-button @click="cancel">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button @click="stepsBack(0)" v-if="stepsActive > 0">{{ $t('btn.back') }}</el-button>
|
||||
<el-button type="primary" @click="stepsNext(1)" v-if="stepsActive < 1">{{ $t('btn.next') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="stepsActive == 1">{{ $t('btn.submit') }}</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button @click="stepsBack(0)" v-if="stepsActive > 0">上一步</el-button>
|
||||
<el-button type="primary" @click="stepsNext(1)" v-if="stepsActive < 1">下一步</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="stepsActive == 1">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<TheDeviceActionDialog v-model="open2" :actionDialogId="actionDialogId"></TheDeviceActionDialog>
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOneDict } from '@/utils/dict.js'
|
||||
import { listDeviceFormConfig, addDeviceFormConfig, delDeviceFormConfig, updateDeviceFormConfig, getDeviceFormConfig } from '@/api/deviceManagement/deviceformconfig.js'
|
||||
|
||||
export default {
|
||||
@@ -132,7 +131,12 @@ export default {
|
||||
//id: [{ required: true, message: 'id 雪花不能为空', trigger: 'blur' }]
|
||||
},
|
||||
options: {
|
||||
typeOptions: []
|
||||
typeOptions: [
|
||||
{ dictValue: 1, dictLabel: '单选' },
|
||||
{ dictValue: 2, dictLabel: '多选' },
|
||||
{ dictValue: 3, dictLabel: '图片' },
|
||||
{ dictValue: 4, dictLabel: '文本' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -252,14 +256,7 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
initDict() {
|
||||
const dictSelectList = ['mes_device_inspect_form_config']
|
||||
getOneDict(dictSelectList[0]).then((statusRes) => {
|
||||
if (statusRes.code === 200) {
|
||||
this.options.typeOptions = statusRes.data[0].list
|
||||
}
|
||||
})
|
||||
},
|
||||
// 初始化字典数据 - 已改为直接定义写死的数据
|
||||
|
||||
columns_showColumn(prop) {
|
||||
const column = this.columns.find(item => item.prop === prop)
|
||||
@@ -268,17 +265,6 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
var dictParams = [{ dictType: 'mes_device_inspect_form_config', columnName: 'typeOptions' }]
|
||||
this.getDicts(dictParams).then((response) => {
|
||||
console.log(response)
|
||||
response.data.forEach((element) => {
|
||||
this.options[element.columnName] = element.list.map((item) => {
|
||||
item.dictValue = parseInt(item.dictValue)
|
||||
return item
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
<vxe-column title="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button text size="small" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button text size="small" icon="Plus" @click="handleAdd(scope.row)"></el-button>
|
||||
<el-button text size="small" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||
<el-button text size="small" icon="el-icon-edit" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button text size="small" icon="el-icon-plus" @click="handleAdd(scope.row)"></el-button>
|
||||
<el-button text size="small" icon="el-icon-delete" @click="handleDelete(scope.row)"></el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" v-model="open" width="720px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="720px" append-to-body>
|
||||
<el-form ref="menuRef" :model="form" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
||||
Reference in New Issue
Block a user