Browse Source

jiahan.wu [cr] 设备参数导入模块需求变更

1.服务配置由文本框调整为下拉列表
develop
eric777 10 months ago
parent
commit
6a66b6e4bb
  1. 8
      src/api/model/tbserverinfo.js
  2. 52
      src/views/model/deviceImportInfo/index.vue

8
src/api/model/tbserverinfo.js

@ -51,3 +51,11 @@ export function exportTbserverinfo(query) {
params: query
})
}
// 查询TB服务信息
export function queryTbserverinfoList() {
return request({
url: '/model/dcBusiServerinfo/select/list',
method: 'get'
})
}

52
src/views/model/deviceImportInfo/index.vue

@ -11,7 +11,7 @@
</el-form-item>
<el-form-item label="组织编码" prop="orgCode">
<el-tree-select v-model="queryParams.orgCode" :data="deptOptions"
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="请选择"
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="请选择组织编码"
check-strictly :default-expand-all="true" />
</el-form-item>
<el-form-item label="项目名称" prop="projectName">
@ -22,13 +22,17 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="服务配置ID" prop="issServerconfid">
<el-input
v-model="queryParams.issServerconfid"
placeholder="请输入服务配置ID"
clearable
@keyup.enter="handleQuery"
<el-form-item label="服务配置" prop="issServerconfid">
<el-select
v-model="queryParams.issServerconfid" placeholder="请选择服务配置"
>
<el-option
v-for="item in tbOptions"
:key="item.id"
:label="item.seviceName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@ -63,7 +67,7 @@
<el-table-column label="记录条数" align="center" prop="recordSize" />
<el-table-column label="组织名称" align="center" prop="orgName" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="服务配置ID" align="center" prop="issServerconfid" />
<el-table-column label="服务配置" align="center" prop="issServerconfname" />
<el-table-column label="上传时间" align="center" prop="createTime" />
<el-table-column label="上传状态" align="center" prop="uploadStatus" :formatter="formatUploadStatus"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -105,8 +109,17 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="服务配置ID" prop="issServerconfid">
<el-input v-model="form.issServerconfid" placeholder="请输入服务配置ID" />
<el-form-item label="服务配置" prop="issServerconfid">
<el-select
v-model="form.issServerconfname" placeholder="请选择服务配置" @change="tbChange"
>
<el-option
v-for="item in tbOptions"
:key="item.id"
:label="item.seviceName"
:value="item"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -155,6 +168,7 @@
<script setup name="Info">
import { listInfo, delInfo, exportInfo, uploadInfo } from "@/api/model/deviceImportInfo";
import { deptTreeSelect } from "@/api/system/user";
import { queryTbserverinfoList } from "@/api/model/tbserverinfo";
const { proxy } = getCurrentInstance();
@ -168,6 +182,7 @@ const multiple = ref(true);
const total = ref(0);
const title = ref("");
const deptOptions = ref(undefined);
const tbOptions = ref(undefined);
const fileList = ref([]);
const props = defineProps({
@ -221,7 +236,7 @@ const data = reactive({
{ required: true, message: "所属组织不能为空", trigger: "change" }
],
issServerconfid: [
{ required: true, message: "服务配置ID不能为空", trigger: "change" }
{ required: true, message: "服务配置不能为空", trigger: "change" }
],
file: [
{ required: true, validator:validateFileList, message: "上传文件不能为空", trigger: "change" }
@ -240,6 +255,12 @@ function getDeptTree() {
deptOptions.value = response.data;
});
};
/** 查询服务信息下拉列表 */
function getTbList() {
queryTbserverinfoList().then(response => {
tbOptions.value = response.data;
});
};
/** 查询设备导入信息列表 */
function getList() {
@ -263,7 +284,8 @@ function reset() {
projectName: null,
orgCode: null,
orgName: null,
issServerconfid: null
issServerconfid: null,
issServerconfname: null
};
proxy.resetForm("deviceImportRef");
fileList.value = [];
@ -412,10 +434,16 @@ function orgNodeClick(data,e) {
form.value.orgCode = data.value;
form.value.orgName = data.label;
}
function tbChange(data,e) {
form.value.issServerconfid = data.id;
form.value.issServerconfname = data.seviceName;
}
function formatUploadStatus(row){
return row.uploadStatus == true ? "成功" : "失败";
}
getDeptTree();
getTbList();
getList();
</script>

Loading…
Cancel
Save