|
@@ -1,26 +1,10 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="机构主键标识" prop="jgid">
|
|
|
+ <el-form-item label="隶属机构" prop="jgid">
|
|
|
<el-input
|
|
|
v-model="queryParams.jgid"
|
|
|
- placeholder="请输入机构主键标识"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="老人主键标识" prop="lrid">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.lrid"
|
|
|
- placeholder="请输入老人主键标识"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="设备主键标识" prop="sbid">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.sbid"
|
|
|
- placeholder="请输入设备主键标识"
|
|
|
+ placeholder="请输入隶属机构"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
@@ -76,12 +60,12 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="接入时间" prop="jrsj">
|
|
|
- <el-date-picker clearable
|
|
|
- v-model="queryParams.jrsj"
|
|
|
- type="datetime"
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- placeholder="请选择接入时间">
|
|
|
- </el-date-picker>
|
|
|
+ <el-date-picker clearable
|
|
|
+ v-model="queryParams.jrsj"
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyyMMddHHmmss"
|
|
|
+ placeholder="请选择接入时间">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="安装方式" prop="azfs">
|
|
|
<el-input
|
|
@@ -91,22 +75,6 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="数据上报频次" prop="sbpc">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.sbpc"
|
|
|
- placeholder="请输入数据上报频次"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="最近数据上报时间" prop="zjsbsj">
|
|
|
- <el-date-picker clearable
|
|
|
- v-model="queryParams.zjsbsj"
|
|
|
- type="datetime"
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- placeholder="请选择最近数据上报时间">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -122,7 +90,8 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['system:jkyjList:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -132,45 +101,37 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['system:jkyjList:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="jkyjListList" >
|
|
|
+ <el-table v-loading="loading" :data="jkyjListList">
|
|
|
<el-table-column label="序号" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- {{(queryParams.pageNum-1)*queryParams.pageSize + scope.$index + 1}}
|
|
|
+ {{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="所属区划" align="center" prop="ssqh" />
|
|
|
- <el-table-column label="机构主键标识" align="center" prop="jgid" />
|
|
|
- <el-table-column label="老人主键标识" align="center" prop="lrid" />
|
|
|
- <el-table-column label="设备主键标识" align="center" prop="sbid" />
|
|
|
- <el-table-column label="设备编号" align="center" prop="sbbh" />
|
|
|
+ <el-table-column label="所属区划" align="center" prop="ssqh"/>
|
|
|
+ <el-table-column label="隶属机构" align="center" prop="jgid"/>
|
|
|
+ <!-- <el-table-column label="归属老人姓名" align="center" prop="lrid"/>-->
|
|
|
+ <el-table-column label="设备编号" align="center" prop="sbbh"/>
|
|
|
<el-table-column label="设备类别" align="center" prop="sblb">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.WL003" :value="scope.row.sblb"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="设备名称" align="center" prop="sbmc" />
|
|
|
- <el-table-column label="生产厂家" align="center" prop="sccj" />
|
|
|
- <el-table-column label="品牌型号" align="center" prop="ppxh" />
|
|
|
- <el-table-column label="接入方式" align="center" prop="jrfs" />
|
|
|
+ <el-table-column label="设备名称" align="center" prop="sbmc"/>
|
|
|
+ <el-table-column label="生产厂家" align="center" prop="sccj"/>
|
|
|
+ <el-table-column label="品牌型号" align="center" prop="ppxh"/>
|
|
|
+ <el-table-column label="接入方式" align="center" prop="jrfs"/>
|
|
|
<el-table-column label="接入时间" align="center" prop="jrsj" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ special(scope.row.jrsj,'time') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="安装方式" align="center" prop="azfs" />
|
|
|
- <el-table-column label="安装描述" align="center" prop="azms" />
|
|
|
- <el-table-column label="数据上报频次" align="center" prop="sbpc" />
|
|
|
- <el-table-column label="最近数据上报时间" align="center" prop="zjsbsj" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ special(scope.row.zjsbsj,'time') }}</span>
|
|
|
+ <span>{{ special(scope.row.jrsj, 'time') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="最近接报数据" align="center" prop="zjsb" />
|
|
|
+ <el-table-column label="安装方式" align="center" prop="azfs"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -179,14 +140,16 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['system:jkyjList:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row,scope.$index)"
|
|
|
v-hasPermi="['system:jkyjList:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -204,75 +167,75 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
<el-form-item label="所属区划" prop="ssqh">
|
|
|
- <el-input v-model="form.ssqh" type="textarea" maxlength="255" show-word-limit placeholder="请输入所属区划" />
|
|
|
+ <el-input v-model="form.ssqh" type="textarea" maxlength="255" show-word-limit placeholder="请输入所属区划"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="老人主键标识" prop="lrid">
|
|
|
- <el-input v-model="form.lrid" placeholder="请输入老人主键标识" />
|
|
|
+ <el-form-item label="归属老人" prop="lrXm">
|
|
|
+ <el-input :disabled="true" v-model="form.lrXm" placeholder="请输入归属老人"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="设备主键标识" prop="sbid">
|
|
|
- <el-input v-model="form.sbid" placeholder="请输入设备主键标识" />
|
|
|
- </el-form-item>
|
|
|
+ <!-- <el-form-item label="设备主键标识" prop="sbid">-->
|
|
|
+ <!-- <el-input v-model="form.sbid" placeholder="请输入设备主键标识" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
|
|
|
<el-form-item label="设备编号" prop="sbbh">
|
|
|
- <el-input v-model="form.sbbh" placeholder="请输入设备编号" />
|
|
|
+ <el-input v-model="form.sbbh" placeholder="请输入设备编号"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="设备类别" prop="sblb">
|
|
|
- <el-select v-model="form.sblb" placeholder="请选择设备类别">
|
|
|
+ <el-select v-model="form.sblb" placeholder="请选择设备类别" style="width: 380px">
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.WL003"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
-:value="dict.value"
|
|
|
+ :value="dict.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="设备名称" prop="sbmc">
|
|
|
- <el-input v-model="form.sbmc" placeholder="请输入设备名称" />
|
|
|
+ <el-input v-model="form.sbmc" placeholder="请输入设备名称"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="生产厂家" prop="sccj">
|
|
|
- <el-input v-model="form.sccj" placeholder="请输入生产厂家" />
|
|
|
+ <el-input v-model="form.sccj" placeholder="请输入生产厂家"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="品牌型号" prop="ppxh">
|
|
|
- <el-input v-model="form.ppxh" placeholder="请输入品牌型号" />
|
|
|
+ <el-input v-model="form.ppxh" placeholder="请输入品牌型号"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="接入方式" prop="jrfs">
|
|
|
- <el-input v-model="form.jrfs" placeholder="请输入接入方式" />
|
|
|
+ <el-input v-model="form.jrfs" placeholder="请输入接入方式"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="接入时间" prop="jrsj">
|
|
|
<el-date-picker clearable
|
|
|
- v-model="form.jrsj"
|
|
|
- type="datetime"
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- placeholder="请选择接入时间">
|
|
|
+ v-model="form.jrsj"
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyyMMddHHmmss"
|
|
|
+ placeholder="请选择接入时间" style="width: 380px">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="安装方式" prop="azfs">
|
|
|
- <el-input v-model="form.azfs" placeholder="请输入安装方式" />
|
|
|
+ <el-input v-model="form.azfs" placeholder="请输入安装方式"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="安装描述" prop="azms">
|
|
|
- <el-input v-model="form.azms" type="textarea" maxlength="400" show-word-limit placeholder="请输入安装描述" />
|
|
|
+ <el-input v-model="form.azms" type="textarea" maxlength="400" show-word-limit placeholder="请输入安装描述"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="数据上报频次" prop="sbpc">
|
|
|
- <el-input v-model="form.sbpc" placeholder="请输入数据上报频次" />
|
|
|
+ <el-input v-model="form.sbpc" placeholder="请输入数据上报频次"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="最近数据上报时间" prop="zjsbsj">
|
|
|
<el-date-picker clearable
|
|
|
- v-model="form.zjsbsj"
|
|
|
- type="datetime"
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- placeholder="请选择最近数据上报时间">
|
|
|
+ v-model="form.zjsbsj"
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyyMMddHHmmss"
|
|
|
+ placeholder="请选择最近数据上报时间" style="width: 380px">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -286,10 +249,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {addJkyjList, delJkyjList, getJkyjList, listJkyjList, updateJkyjList} from "@/api/system/jkyjList";
|
|
|
- import {chineseOne, idCard, Regular} from '@/utils/regular'
|
|
|
+import {addJkyjList, delJkyjList, getJkyjList, listJkyjList, updateJkyjList} from "@/api/system/jkyjList";
|
|
|
+import {chineseOne, idCard, Regular} from '@/utils/regular'
|
|
|
|
|
|
- export default {
|
|
|
+export default {
|
|
|
name: "JkyjList",
|
|
|
dicts: ['WL003'],
|
|
|
data() {
|
|
@@ -323,29 +286,29 @@
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
sbbh: [
|
|
|
- { required: true, message: "设备编号不能为空", trigger: "blur" },
|
|
|
- { max: 32, message: '设备编号不能超过32个字符', trigger: 'blur'},
|
|
|
+ {required: true, message: "设备编号不能为空", trigger: "blur"},
|
|
|
+ {max: 32, message: '设备编号不能超过32个字符', trigger: 'blur'},
|
|
|
],
|
|
|
sbmc: [
|
|
|
- { max: 72, message: '设备名称不能超过72个字符', trigger: 'blur'},
|
|
|
+ {max: 72, message: '设备名称不能超过72个字符', trigger: 'blur'},
|
|
|
],
|
|
|
sccj: [
|
|
|
- { max: 72, message: '生产厂家不能超过72个字符', trigger: 'blur'},
|
|
|
+ {max: 72, message: '生产厂家不能超过72个字符', trigger: 'blur'},
|
|
|
],
|
|
|
ppxh: [
|
|
|
- { max: 32, message: '品牌型号不能超过32个字符', trigger: 'blur'},
|
|
|
+ {max: 32, message: '品牌型号不能超过32个字符', trigger: 'blur'},
|
|
|
],
|
|
|
jrfs: [
|
|
|
- { max: 2, message: '接入方式不能超过2个字符', trigger: 'blur'},
|
|
|
+ {max: 2, message: '接入方式不能超过2个字符', trigger: 'blur'},
|
|
|
],
|
|
|
azfs: [
|
|
|
- { max: 2, message: '安装方式不能超过2个字符', trigger: 'blur'},
|
|
|
+ {max: 2, message: '安装方式不能超过2个字符', trigger: 'blur'},
|
|
|
],
|
|
|
sbpc: [
|
|
|
- { max: 12, message: '数据上报频次不能超过12个字符', trigger: 'blur'},
|
|
|
+ {max: 12, message: '数据上报频次不能超过12个字符', trigger: 'blur'},
|
|
|
],
|
|
|
status: [
|
|
|
- { required: true, message: "设备状态 0不能为空", trigger: "blur" },
|
|
|
+ {required: true, message: "设备状态 0不能为空", trigger: "blur"},
|
|
|
]
|
|
|
}
|
|
|
};
|
|
@@ -370,7 +333,7 @@
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
- this.submitFormLoading =false;
|
|
|
+ this.submitFormLoading = false;
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
ssqh: null,
|
|
@@ -386,6 +349,7 @@
|
|
|
azfs: null,
|
|
|
azms: null,
|
|
|
sbpc: null,
|
|
|
+ lrXm: null,
|
|
|
zjsbsj: null,
|
|
|
zjsb: null,
|
|
|
status: 0
|
|
@@ -405,14 +369,14 @@
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加为老服务监控硬件列表";
|
|
|
+ this.title = "监控硬件";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -421,10 +385,10 @@
|
|
|
getJkyjList(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
/****** sks 需要改动的地方 start ******/
|
|
|
- this.copyForm=this.deepCopy(response.data)
|
|
|
+ this.copyForm = this.deepCopy(response.data)
|
|
|
/****** sks 需要改动的地方 end ******/
|
|
|
this.open = true;
|
|
|
- this.title = "修改为老服务监控硬件列表";
|
|
|
+ this.title = "监控硬件";
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -434,15 +398,15 @@
|
|
|
this.submitFormLoading = true;
|
|
|
if (this.form.id != null) {
|
|
|
/****** sks 需要改动的地方 start ******/
|
|
|
- let formData=this.comparisonObject(this.form,this.copyForm);
|
|
|
- if(formData) {
|
|
|
- updateJkyjList({...formData,id:this.form.id}).then(response => {
|
|
|
+ let formData = this.comparisonObject(this.form, this.copyForm);
|
|
|
+ if (formData) {
|
|
|
+ updateJkyjList({...formData, id: this.form.id}).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
- this.jkyjListList=this.dataReplacement(this.jkyjListList,this.form.id,formData);
|
|
|
+ this.jkyjListList = this.dataReplacement(this.jkyjListList, this.form.id, formData);
|
|
|
// this.getList();
|
|
|
- }).finally(()=>this.submitFormLoading =false);
|
|
|
- }else{
|
|
|
+ }).finally(() => this.submitFormLoading = false);
|
|
|
+ } else {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.submitFormLoading = false;
|
|
@@ -454,37 +418,37 @@
|
|
|
this.open = false;
|
|
|
// this.getList();
|
|
|
/****** sks 需要改动的地方 start ******/
|
|
|
- if (this.queryParams.pageSize===this.jkyjListList.length)
|
|
|
- {
|
|
|
+ if (this.queryParams.pageSize === this.jkyjListList.length) {
|
|
|
this.jkyjListList.pop();
|
|
|
}
|
|
|
- this.jkyjListList.unshift({...this.form,id:response.data});
|
|
|
+ this.jkyjListList.unshift({...this.form, id: response.data});
|
|
|
this.total++;
|
|
|
/****** sks 需要改动的地方 end ******/
|
|
|
- }).finally(()=>this.submitFormLoading =false);
|
|
|
+ }).finally(() => this.submitFormLoading = false);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
- handleDelete(row,index) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- const xh = (this.queryParams.pageNum-1)*this.queryParams.pageSize + index + 1;
|
|
|
- this.$modal.confirm('确认删除' + this.changeDelData(row,'id','ID值',xh) + '的记录?').then(function() {
|
|
|
- return delJkyjList(ids);
|
|
|
+ handleDelete(row, index) {
|
|
|
+ const ids = row.id;
|
|
|
+ const xh = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
|
|
|
+ this.$modal.confirm('确认删除' + this.changeDelData(row, 'id', 'ID值', xh) + '的记录?').then(function () {
|
|
|
+ const param = {id: ids};
|
|
|
+ return delJkyjList(param);
|
|
|
}).then(() => {
|
|
|
// this.getList();
|
|
|
/****** sks 需要改动的地方 ind参数需要传进来 start ******/
|
|
|
- this.jkyjListList.splice(index,1);
|
|
|
- if(this.jkyjListList.length===0)
|
|
|
- {
|
|
|
+ this.jkyjListList.splice(index, 1);
|
|
|
+ if (this.jkyjListList.length === 0) {
|
|
|
this.getList();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.total--;
|
|
|
}
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
/****** sks 需要改动的地方 end ******/
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|