|
|
|
@ -8,23 +8,13 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="display: flex; margin-top: 7px"> |
|
|
|
<div |
|
|
|
:style=" |
|
|
|
'width: 208px;overflow: scroll;height:' + |
|
|
|
(window.pageHeight < 600 ? 480 : window.pageHeight - 100) + |
|
|
|
'px;background-color: #fff; border-radius: 8px' |
|
|
|
" |
|
|
|
> |
|
|
|
<div :style="'width: 208px;overflow: scroll;height:' + |
|
|
|
(window.pageHeight < 600 ? 480 : window.pageHeight - 100) + |
|
|
|
'px;background-color: #fff; border-radius: 8px' |
|
|
|
"> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-tree |
|
|
|
:data="category" |
|
|
|
:props="treeprops" |
|
|
|
@node-click="treeclick" |
|
|
|
node-key="id" |
|
|
|
ref="itemType" |
|
|
|
highlight-current |
|
|
|
auto-expand-parent |
|
|
|
> |
|
|
|
<el-tree :data="category" :props="treeprops" @node-click="treeclick" node-key="id" ref="itemType" |
|
|
|
highlight-current auto-expand-parent> |
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
<div> |
|
|
|
<span class="treeicons"> |
|
|
|
@ -32,16 +22,10 @@ |
|
|
|
class="el-icon-document-remove" |
|
|
|
v-if="data.parentId == null" |
|
|
|
></i> --> |
|
|
|
<img |
|
|
|
style="width: 20px; height: 20px; vertical-align: sub" |
|
|
|
src="@/assets/images/order.png" |
|
|
|
v-if="!data.parentId" |
|
|
|
/> |
|
|
|
<img style="width: 20px; height: 20px; vertical-align: sub" src="@/assets/images/order.png" |
|
|
|
v-if="!data.parentId" /> |
|
|
|
</span> |
|
|
|
<span |
|
|
|
:class="!data.parentId ? 'maxtitle' : 'mintitle'" |
|
|
|
>{{ node.label }}</span |
|
|
|
> |
|
|
|
<span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{ node.label }}</span> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-tree> |
|
|
|
@ -49,89 +33,61 @@ |
|
|
|
</div> |
|
|
|
<div style="display: block"> |
|
|
|
<div style="margin-left: 15px; display: flex"> |
|
|
|
<div |
|
|
|
:style=" |
|
|
|
'width:' + |
|
|
|
(window.pageWidth - 200 - 110 - 50 - 14) + |
|
|
|
'px;padding: 15px;background-color: #fff;border-radius: 8px;' |
|
|
|
" |
|
|
|
> |
|
|
|
<div :style="'width:' + |
|
|
|
(window.pageWidth - 200 - 110 - 50 - 14) + |
|
|
|
'px;padding: 15px;background-color: #fff;border-radius: 8px;' |
|
|
|
"> |
|
|
|
<div id="printTest"> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
row-key="id" |
|
|
|
class="el-table__body-wrapper tbody" |
|
|
|
@row-click="rowick" |
|
|
|
highlight-current-row |
|
|
|
:height=" |
|
|
|
window.pageHeight < 600 ? 450 : window.pageHeight - 130 |
|
|
|
" |
|
|
|
ref="tableData" |
|
|
|
> |
|
|
|
<el-table :data="tableData" row-key="id" class="el-table__body-wrapper tbody" @row-click="rowick" |
|
|
|
highlight-current-row :height="window.pageHeight < 600 ? 450 : window.pageHeight - 130 |
|
|
|
" ref="tableData"> |
|
|
|
<el-table-column prop="id" label="编号" width="300"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="displayName" label="名称" width=""> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="deviceProtocolFlag" |
|
|
|
label="设备协议" |
|
|
|
width="" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ dddw(deviceProtocolFlag, "id", scope.row.deviceProtocolFlag, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="deviceProtocolFlag" label="设备协议" width=""> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ dddw(deviceProtocolFlag, "id", scope.row.deviceProtocolFlag, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="aeTitle" label="AETitle" width="" show-overflow-tooltip> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="deviceCode" label="设备编码" width="" /> |
|
|
|
<el-table-column prop="deviceImageType" label="图片类型" width=""> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dddw(deviceImageType, "id", scope.row.deviceImageType, "displayName") }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="creatorName" label="创建者" width=""> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="lastModifierName" |
|
|
|
label="修改者" |
|
|
|
width="" |
|
|
|
> |
|
|
|
<el-table-column prop="lastModifierName" label="修改者" width=""> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="simpleCode" label="简称" width="180"> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column |
|
|
|
prop="creationTime" |
|
|
|
label="创建时间" |
|
|
|
width="200" |
|
|
|
> |
|
|
|
<el-table-column prop="creationTime" label="创建时间" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.creationTime | dateFormat }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="lastModificationTime" |
|
|
|
label="修改时间" |
|
|
|
width="200" |
|
|
|
> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改时间" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.lastModificationTime | dateFormat }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="" align="center"> |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
class="move" |
|
|
|
style=" |
|
|
|
<el-tag class="move" style=" |
|
|
|
cursor: move; |
|
|
|
background-color: rgb(245, 245, 245); |
|
|
|
border: none; |
|
|
|
" |
|
|
|
draggable="true" |
|
|
|
> |
|
|
|
<i |
|
|
|
class="el-icon-d-caret" |
|
|
|
style=" |
|
|
|
" draggable="true"> |
|
|
|
<i class="el-icon-d-caret" style=" |
|
|
|
width: 1rem; |
|
|
|
height: 1rem; |
|
|
|
color: rgb(113, 113, 113); |
|
|
|
" |
|
|
|
></i> |
|
|
|
"></i> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -140,46 +96,24 @@ |
|
|
|
</div> |
|
|
|
<!-- 按钮区域 --> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button type="" @click="add" class="commonbutton" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="add" class="commonbutton">新增</el-button> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="edlits" class="commonbutton" |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="edlits" class="commonbutton">编辑</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="deleteid" class="deleteButton" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="deleteid" class="deleteButton">删除</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="topping" class="commonbutton" |
|
|
|
>置顶</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="topping" class="commonbutton">置顶</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="toppings" class="commonbutton" |
|
|
|
>置底</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="toppings" class="commonbutton">置底</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="assertion" |
|
|
|
class="commonbutton" |
|
|
|
>排序</el-button |
|
|
|
> |
|
|
|
<el-button type="" :disabled="isshow" @click="assertion" class="commonbutton">排序</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="cancellation" |
|
|
|
class="commonbutton" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button type="" :disabled="isshow" @click="cancellation" class="commonbutton">取消</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -188,127 +122,89 @@ |
|
|
|
<!-- <div class="cancelorconfirm"></div> --> |
|
|
|
<!-- 新增或者编辑弹框 --> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
:title="title == 1 ? '新增' : '修改'" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="75%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
<el-dialog :title="title == 1 ? '新增' : '修改'" :visible.sync="dialogVisible" width="800px" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<el-form ref="form" :model="form" label-width="80px" :rules="rules"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label="编号"> |
|
|
|
<el-input |
|
|
|
v-model="form.id" |
|
|
|
style="width: 65%" |
|
|
|
disabled |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
<el-input v-model="form.id" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="仪器类别"> |
|
|
|
<el-select |
|
|
|
v-model="form.deviceTypeId" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in category" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="仪器类别" prop="deviceTypeId"> |
|
|
|
<el-select v-model="form.deviceTypeId" placeholder="请选择" size="small"> |
|
|
|
<el-option v-for="item in category" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="名称"> |
|
|
|
<el-input |
|
|
|
ref="refinput" |
|
|
|
v-model="form.displayName" |
|
|
|
style="width: 65%" |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="名称" prop="displayName"> |
|
|
|
<el-input ref="refinput" v-model="form.displayName" size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="设备协议"> |
|
|
|
<el-select |
|
|
|
v-model="form.deviceProtocolFlag" |
|
|
|
placeholder="设备协议" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option v-for="item in deviceProtocolFlag" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="设备协议" prop="deviceProtocolFlag"> |
|
|
|
<el-select v-model="form.deviceProtocolFlag" placeholder="设备协议" size="small"> |
|
|
|
<el-option v-for="item in deviceProtocolFlag" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="设备编码" prop="deviceCode"> |
|
|
|
<el-input v-model="form.deviceCode" placeholder="设备编码" size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="图片类型" prop="deviceImageType"> |
|
|
|
<el-select v-model="form.deviceImageType" placeholder="图片类型" size="small"> |
|
|
|
<el-option v-for="item in deviceImageType" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label="AETitle"> |
|
|
|
<!-- <el-input |
|
|
|
v-model="form.parmValue" |
|
|
|
size="small" |
|
|
|
></el-input> --> |
|
|
|
<el-input |
|
|
|
v-model="form.aeTitle" |
|
|
|
:disabled="form.deviceProtocolFlag!='1'" |
|
|
|
></el-input> |
|
|
|
<el-input v-model="form.aeTitle" :disabled="form.deviceProtocolFlag != '1'" size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-divider></el-divider> |
|
|
|
<el-col :span="4" style="margin-left: 15px"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="创建者"> |
|
|
|
<el-input |
|
|
|
v-model="form.creatorName" |
|
|
|
disabled |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
<el-input v-model="form.creatorName" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item label="创建时间"> |
|
|
|
<el-input |
|
|
|
:value="form.creationTime | dateFormat" |
|
|
|
disabled |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
<el-input :value="form.creationTime | dateFormat" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="修改者"> |
|
|
|
<el-input |
|
|
|
v-model="form.lastModifierName" |
|
|
|
disabled |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
<el-input v-model="form.lastModifierName" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item label="修改时间"> |
|
|
|
<el-input |
|
|
|
style="width: 85%" |
|
|
|
:value="form.lastModificationTime | dateFormat" |
|
|
|
disabled |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
<el-input :value="form.lastModificationTime | dateFormat" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false" class="difference" |
|
|
|
>取 消</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="addoredit" class="commonbutton" |
|
|
|
>确 定</el-button |
|
|
|
> |
|
|
|
<el-button @click="dialogVisible = false" class="difference">取 消</el-button> |
|
|
|
<el-button type="primary" @click="addoredit('form')" class="commonbutton">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
@ -319,7 +215,7 @@ import Sortable from "sortablejs"; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
import { instrumentlist } from "../../request/systemapi"; |
|
|
|
import { deletapi, getapi, postapi, putapi } from "@/api/api"; |
|
|
|
import {dddw } from "../../utlis/proFunc"; |
|
|
|
import { dddw } from "../../utlis/proFunc"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -327,10 +223,13 @@ export default { |
|
|
|
dialogVisible: false, |
|
|
|
title: 1, |
|
|
|
form: { |
|
|
|
id:"", |
|
|
|
displayName: "", |
|
|
|
deviceTypeId: "", |
|
|
|
deviceProtocolFlag:"", |
|
|
|
aeTitle:"" |
|
|
|
deviceProtocolFlag: "", |
|
|
|
aeTitle: "", |
|
|
|
deviceCode:"", |
|
|
|
deviceImageType:"0" |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
initTableData: [], |
|
|
|
@ -343,14 +242,25 @@ export default { |
|
|
|
value: "id", |
|
|
|
children: "treeChildren", |
|
|
|
}, //左侧树形结构需要的数据 |
|
|
|
deviceTypeId:"", |
|
|
|
deviceProtocolFlag:[{ |
|
|
|
id:"0", |
|
|
|
displayName:"视频采集图片和导入图片" |
|
|
|
},{ |
|
|
|
id:"1", |
|
|
|
displayName:"dicom" |
|
|
|
}] |
|
|
|
deviceTypeId: "", |
|
|
|
deviceProtocolFlag: [{ |
|
|
|
id: "0", |
|
|
|
displayName: "视频采集图片和导入图片" |
|
|
|
}, { |
|
|
|
id: "1", |
|
|
|
displayName: "dicom" |
|
|
|
}], |
|
|
|
deviceImageType: [ |
|
|
|
{ id: "0", displayName: "非报告图" }, |
|
|
|
{ id: "1", displayName: "报告图片" }, |
|
|
|
], |
|
|
|
rules: { |
|
|
|
deviceTypeId: [{ required: true, message: "请填写设备类别", trigger: "blur" }], |
|
|
|
displayName: [{ required: true, message: "请填写设备名称", trigger: "blur" }], |
|
|
|
deviceProtocolFlag: [{ required: true, message: "请填写设备协议", trigger: "blur" }], |
|
|
|
deviceCode: [{ required: true, message: "请填写编码", trigger: "blur" }], |
|
|
|
deviceImageType: [{ required: true, message: "请填写图片类别", trigger: "blur" }], |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -388,7 +298,7 @@ export default { |
|
|
|
this.initTableData.forEach((item) => { |
|
|
|
if ( |
|
|
|
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > |
|
|
|
-1 || |
|
|
|
-1 || |
|
|
|
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 |
|
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
) { |
|
|
|
@ -414,29 +324,29 @@ export default { |
|
|
|
}, |
|
|
|
searchup(data, index) { |
|
|
|
// if (index > 3) { |
|
|
|
const targetTop = this.$refs["tableData"].$el |
|
|
|
.querySelectorAll(".el-table__body tr") |
|
|
|
[index - 1].getBoundingClientRect().top; |
|
|
|
const containerTop = this.$refs["tableData"].$el |
|
|
|
.querySelector(".el-table__body") |
|
|
|
.getBoundingClientRect().top; |
|
|
|
const scrollParent = this.$refs["tableData"].$el.querySelector( |
|
|
|
".el-table__body-wrapper" |
|
|
|
); |
|
|
|
scrollParent.scrollTop = targetTop - containerTop; |
|
|
|
const targetTop = this.$refs["tableData"].$el |
|
|
|
.querySelectorAll(".el-table__body tr") |
|
|
|
[index - 1].getBoundingClientRect().top; |
|
|
|
const containerTop = this.$refs["tableData"].$el |
|
|
|
.querySelector(".el-table__body") |
|
|
|
.getBoundingClientRect().top; |
|
|
|
const scrollParent = this.$refs["tableData"].$el.querySelector( |
|
|
|
".el-table__body-wrapper" |
|
|
|
); |
|
|
|
scrollParent.scrollTop = targetTop - containerTop; |
|
|
|
// } |
|
|
|
}, |
|
|
|
treeclick(data) { |
|
|
|
this.deviceTypeId = data.id; |
|
|
|
postapi("/api/app/Device/GetList",{ |
|
|
|
deviceTypeId:this.deviceTypeId |
|
|
|
postapi("/api/app/Device/GetList", { |
|
|
|
deviceTypeId: this.deviceTypeId |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.initTableData = [...res.data]; |
|
|
|
this.initTableData = [...res.data]; |
|
|
|
this.tableData = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.curRow=this.$options.data().curRow |
|
|
|
this.curRow = this.$options.data().curRow |
|
|
|
}, |
|
|
|
cancellation() { |
|
|
|
this.$message.info("取消操作"); |
|
|
|
@ -501,9 +411,9 @@ export default { |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.warning("请选择操作的数据"); |
|
|
|
} else { |
|
|
|
postapi("/api/app/Device/UpdateManySort",{ |
|
|
|
deviceId:this.curRow.id, |
|
|
|
sortType:1 |
|
|
|
postapi("/api/app/Device/UpdateManySort", { |
|
|
|
deviceId: this.curRow.id, |
|
|
|
sortType: 1 |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.getlist(); |
|
|
|
@ -517,9 +427,9 @@ export default { |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.warning("请选择操作的数据"); |
|
|
|
} else { |
|
|
|
postapi("/api/app/Device/UpdateManySort",{ |
|
|
|
deviceId:this.curRow.id, |
|
|
|
sortType:2 |
|
|
|
postapi("/api/app/Device/UpdateManySort", { |
|
|
|
deviceId: this.curRow.id, |
|
|
|
sortType: 2 |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.getlist(); |
|
|
|
@ -542,17 +452,17 @@ export default { |
|
|
|
confirmButtonClass: "commonbutton", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
postapi("/api/app/Device/Delete",{ |
|
|
|
deviceId:this.curRow.id |
|
|
|
postapi("/api/app/Device/Delete", { |
|
|
|
deviceId: this.curRow.id |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.curRow=this.$options.data().curRow |
|
|
|
this.curRow = this.$options.data().curRow |
|
|
|
this.getlist(); |
|
|
|
//this.$message.success("删除成功"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.catch(() => { }); |
|
|
|
} |
|
|
|
}, |
|
|
|
//edlits编辑弹框 |
|
|
|
@ -563,8 +473,8 @@ export default { |
|
|
|
} else { |
|
|
|
this.title = 2; |
|
|
|
this.dialogVisible = true; |
|
|
|
postapi("/api/app/Device/Get",{ |
|
|
|
deviceId:this.form.id |
|
|
|
postapi("/api/app/Device/Get", { |
|
|
|
deviceId: this.form.id |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.form = res.data; |
|
|
|
@ -573,21 +483,15 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
//确定新增或者修改 |
|
|
|
addoredit() { |
|
|
|
if (this.form.displayName == "") { |
|
|
|
this.$message.warning("请输入名称"); |
|
|
|
} else if (this.form.deviceTypeId == "") { |
|
|
|
this.$message.warning("请选择仪器类别"); |
|
|
|
} else if (this.form.deviceProtocolFlag == "") { |
|
|
|
this.$message.warning("请选择设备协议"); |
|
|
|
}else { |
|
|
|
if (this.title == 1) { |
|
|
|
postapi("/api/app/Device/Create", { |
|
|
|
displayName: this.form.displayName, |
|
|
|
deviceTypeId: this.form.deviceTypeId, |
|
|
|
deviceProtocolFlag:this.form.deviceProtocolFlag, |
|
|
|
aeTitle:this.form.aeTitle |
|
|
|
}).then((res) => { |
|
|
|
addoredit(formName) { |
|
|
|
this.$refs[formName].validate((valid, fields) => { |
|
|
|
if (!valid) { |
|
|
|
this.$message.warning(fields[Object.keys(fields)[0]][0].message); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.title == 1) { |
|
|
|
postapi("/api/app/Device/Create", this.form).then((res) => { |
|
|
|
// this.form.displayName = ""; |
|
|
|
if (res.code != -1) { |
|
|
|
this.getlist(); |
|
|
|
@ -595,13 +499,15 @@ export default { |
|
|
|
//this.$message.success("新增成功"); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (this.title == 2) { |
|
|
|
} else if (this.title == 2) { |
|
|
|
postapi("/api/app/Device/Update", { |
|
|
|
deviceId:this.form.id, |
|
|
|
deviceId: this.form.id, |
|
|
|
displayName: this.form.displayName, |
|
|
|
deviceTypeId: this.form.deviceTypeId, |
|
|
|
deviceProtocolFlag:this.form.deviceProtocolFlag, |
|
|
|
aeTitle:this.form.aeTitle |
|
|
|
deviceProtocolFlag: this.form.deviceProtocolFlag, |
|
|
|
aeTitle: this.form.aeTitle, |
|
|
|
deviceCode: this.form.deviceCode, |
|
|
|
deviceImageType: this.form.deviceImageType |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.getlist(); |
|
|
|
@ -609,30 +515,30 @@ export default { |
|
|
|
//this.$message.success("修改成功"); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
//新增弹框 |
|
|
|
add() { |
|
|
|
if (this.deviceTypeId == undefined || this.deviceTypeId == "") { |
|
|
|
this.$message.warning("请选择仪器类别"); |
|
|
|
}else{ |
|
|
|
this.dialogVisible = true; |
|
|
|
this.title = 1; |
|
|
|
this.form=this.$options.data().form |
|
|
|
this.form.deviceTypeId = this.deviceTypeId; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.refinput.focus(); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.dialogVisible = true; |
|
|
|
this.title = 1; |
|
|
|
this.form = this.$options.data().form |
|
|
|
this.form.deviceTypeId = this.deviceTypeId; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.refinput.focus(); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// |
|
|
|
getlist() { |
|
|
|
postapi("/api/app/Device/GetList",{ |
|
|
|
deviceTypeId:this.deviceTypeId |
|
|
|
postapi("/api/app/Device/GetList", { |
|
|
|
deviceTypeId: this.deviceTypeId |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.initTableData = [...res.data]; |
|
|
|
this.initTableData = [...res.data]; |
|
|
|
this.tableData = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -647,37 +553,46 @@ export default { |
|
|
|
@import "../../assets/css/global_form.css"; |
|
|
|
@import "../../assets/css/global_input.css"; |
|
|
|
@import "../../assets/css/global.css"; |
|
|
|
|
|
|
|
.box { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
|
|
|
|
:deep .el-form-item { |
|
|
|
margin-bottom: 14px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的头部样式 */ |
|
|
|
:deep .el-dialog__header { |
|
|
|
padding: 11px 20px 11px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的主体样式 */ |
|
|
|
:deep .el-dialog__body { |
|
|
|
padding: 0px 20px 0px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-divider样式 */ |
|
|
|
:deep .el-divider--horizontal { |
|
|
|
margin: 0px 0 12px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的底部样式 */ |
|
|
|
:deep .el-dialog__footer { |
|
|
|
padding: 0px 20px 14px; |
|
|
|
} |
|
|
|
|
|
|
|
.seachinput { |
|
|
|
width: 250px; |
|
|
|
margin-right: 110px; |
|
|
|
} |
|
|
|
|
|
|
|
:deep .seachinput .el-select { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
:deep .el-tree-node>.el-tree-node__children{ |
|
|
|
|
|
|
|
:deep .el-tree-node>.el-tree-node__children { |
|
|
|
overflow: visible; |
|
|
|
} |
|
|
|
</style> |