|
|
|
|
@ -78,7 +78,6 @@
|
|
|
|
|
width="55"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="序号" align="center" prop="id" />
|
|
|
|
|
<el-table-column label="升序排序" align="center" prop="sortNo" />
|
|
|
|
|
<el-table-column label="仪器ID" align="center" prop="id" />
|
|
|
|
|
<el-table-column label="仪器类型" align="center" prop="type">
|
|
|
|
|
@ -94,15 +93,11 @@
|
|
|
|
|
width="150px"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
<el-avatar
|
|
|
|
|
shape="square"
|
|
|
|
|
:size="100"
|
|
|
|
|
:src="scope.row.banner"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:preview-src-list="[scope.row.banner]"
|
|
|
|
|
>
|
|
|
|
|
<div slot="placeholder" class="image-slot">
|
|
|
|
|
<span class="dot"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-image>
|
|
|
|
|
></el-avatar>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
@ -112,15 +107,11 @@
|
|
|
|
|
width="150px"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
<el-avatar
|
|
|
|
|
shape="square"
|
|
|
|
|
:size="100"
|
|
|
|
|
:src="scope.row.logo"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:preview-src-list="[scope.row.logo]"
|
|
|
|
|
>
|
|
|
|
|
<div slot="placeholder" class="image-slot">
|
|
|
|
|
<span class="dot"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-image>
|
|
|
|
|
></el-avatar>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
@ -281,7 +272,6 @@
|
|
|
|
|
:on-remove="bannerUploadRemove"
|
|
|
|
|
:on-success="bannerUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -329,7 +319,6 @@
|
|
|
|
|
:on-remove="logoUploadRemove"
|
|
|
|
|
:on-success="logoUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -377,7 +366,6 @@
|
|
|
|
|
:on-remove="serialUploadRemove"
|
|
|
|
|
:on-success="serialUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -428,7 +416,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="扫码绑定介绍视频/图片" prop="scanCodeBinding">
|
|
|
|
|
<el-form-item label="扫码绑定介绍图片" prop="scanCodeBinding">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
@ -518,12 +506,8 @@
|
|
|
|
|
<el-option label="IOT仪器" :value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="form.type === 2" label="仪器型号" prop="model">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.model"
|
|
|
|
|
@change="modelChange"
|
|
|
|
|
style="width: 50%"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item v-if="form.type == 2" label="仪器型号" prop="model">
|
|
|
|
|
<el-select v-model="form.model" @change="modelChange" style="width: 50%">
|
|
|
|
|
<el-option label="FR200" value="FR200"></el-option>
|
|
|
|
|
<el-option label="WL200" value="WL200"></el-option>
|
|
|
|
|
<el-option label="FR380" value="FR380"></el-option>
|
|
|
|
|
@ -531,16 +515,6 @@
|
|
|
|
|
<el-option label="M01" value="M01"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="扫机身码" prop="isScanCode">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="form.isScanCode"
|
|
|
|
|
:active-value="1"
|
|
|
|
|
:inactive-value="0"
|
|
|
|
|
active-color="#13ce66"
|
|
|
|
|
inactive-color="#DCDCDC"
|
|
|
|
|
>
|
|
|
|
|
</el-switch>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="模式" prop="modeIdsValue">
|
|
|
|
|
<template>
|
|
|
|
|
<el-select
|
|
|
|
|
@ -599,7 +573,16 @@
|
|
|
|
|
>
|
|
|
|
|
</el-time-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="扫机身码" prop="isScanCode">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="form.isScanCode"
|
|
|
|
|
:active-value="1"
|
|
|
|
|
:inactive-value="0"
|
|
|
|
|
active-color="#13ce66"
|
|
|
|
|
inactive-color="#DCDCDC"
|
|
|
|
|
>
|
|
|
|
|
</el-switch>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="是否支持购买" prop="isPurchase">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.isPurchase"
|
|
|
|
|
@ -895,47 +878,6 @@
|
|
|
|
|
placeholder="请输入蓝牙断开连接文案"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- we200蓝牙链接图片 -->
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type == 2 && form.model === 'WL200'"
|
|
|
|
|
label="we200蓝牙连接中图片"
|
|
|
|
|
prop="we200BluetoothConnecting"
|
|
|
|
|
>
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
:limit="1"
|
|
|
|
|
:on-exceed="we200BluetoothConnectUploadExceed"
|
|
|
|
|
:on-success="we200BluetoothConnectUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:file-list="we200BluetoothConnectFile.fileList"
|
|
|
|
|
accept=".png,.jpg,.jpeg,.gif,.mpeg,.mp4,.avi,.mov,.wmv"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传一个文件</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type == 2 && form.model === 'WL200'"
|
|
|
|
|
label="we200蓝牙连接中标题"
|
|
|
|
|
prop="we200BluetoothConnectingTitle"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.we200BluetoothConnectingTitle"
|
|
|
|
|
placeholder="请输入we200蓝牙连接中标题"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type == 2 && form.model === 'WL200'"
|
|
|
|
|
label="we200蓝牙连接中文案"
|
|
|
|
|
prop="we200BluetoothConnectingContent"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.we200BluetoothConnectingContent"
|
|
|
|
|
placeholder="请输入we200蓝牙连接中文案"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="form.type == 2" label="IOT版本" prop="iotVersion">
|
|
|
|
|
<div style="position: relative">
|
|
|
|
|
<el-tooltip
|
|
|
|
|
@ -997,16 +939,10 @@
|
|
|
|
|
v-model="form.iotVersionUpgrade"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:min-height="192"
|
|
|
|
|
id="editor1"
|
|
|
|
|
tableName="editor1"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- WE200 -->
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type == 2 && form.model === 'WL200'"
|
|
|
|
|
label="WE200IOT版本"
|
|
|
|
|
prop="we200IotVersion"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item v-if="form.type == 2" label="WE200IOT版本" prop="we200IotVersion">
|
|
|
|
|
<div style="position: relative">
|
|
|
|
|
<el-tooltip
|
|
|
|
|
class="item"
|
|
|
|
|
@ -1017,13 +953,10 @@
|
|
|
|
|
<i class="we200-iotVersion-absolute-info el-icon-info"></i>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.we200IotVersion"
|
|
|
|
|
placeholder="请输入WE200IOT版本"
|
|
|
|
|
/>
|
|
|
|
|
<el-input v-model="form.we200IotVersion" placeholder="请输入WE200IOT版本" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type === 2 && form.model === 'WL200'"
|
|
|
|
|
v-if="form.type == 2"
|
|
|
|
|
label="WE200IOT升级数据文件"
|
|
|
|
|
prop="we200IotUpgradeData"
|
|
|
|
|
>
|
|
|
|
|
@ -1052,7 +985,7 @@
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="form.type == 2 && form.model === 'WL200'"
|
|
|
|
|
v-if="form.type == 2"
|
|
|
|
|
label="WE200IOT版本升级介绍"
|
|
|
|
|
prop="we200IotVersionUpgrade"
|
|
|
|
|
>
|
|
|
|
|
@ -1070,8 +1003,6 @@
|
|
|
|
|
v-model="form.we200IotVersionUpgrade"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:min-height="192"
|
|
|
|
|
id="editor2"
|
|
|
|
|
tableName="editor2"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
@ -1234,7 +1165,6 @@
|
|
|
|
|
<!-- scope.row.link -->
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-upload
|
|
|
|
|
ref="bookUpload"
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
@ -1253,7 +1183,6 @@
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:file-list="scope.row.fileList"
|
|
|
|
|
accept=".pdf,.PDF"
|
|
|
|
|
:before-upload="pdfHandleBeforeUpload"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
@ -1262,25 +1191,24 @@
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
v-show="scope.row.save"
|
|
|
|
|
v-if="scope.row.link != null"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="copyInstructionNameUrl(scope.row)"
|
|
|
|
|
>复制说明书
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-show="scope.row.save"
|
|
|
|
|
v-if="scope.row.link != null"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="viewInstrumentInstruction(scope.row)"
|
|
|
|
|
>查看说明书
|
|
|
|
|
</el-button>
|
|
|
|
|
<br />
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.link != null"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="saveInstrumentInstruction(scope.row, scope.$index)"
|
|
|
|
|
@click="saveInstrumentInstruction(scope.row)"
|
|
|
|
|
>保存说明书
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
@ -1353,29 +1281,13 @@ export default {
|
|
|
|
|
components: { Treeselect, draggable },
|
|
|
|
|
props: {
|
|
|
|
|
// 大小限制(MB)
|
|
|
|
|
imageFileSize: {
|
|
|
|
|
fileSize: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 1,
|
|
|
|
|
},
|
|
|
|
|
imageFileType: {
|
|
|
|
|
fileType: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => ['bmp', 'gif', 'jpg', 'jpeg', 'png'],
|
|
|
|
|
},
|
|
|
|
|
videoFileSize: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 10,
|
|
|
|
|
},
|
|
|
|
|
videoFileType: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => ['mp4', 'avi', 'rmvb'],
|
|
|
|
|
},
|
|
|
|
|
pdfFileSize: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 10,
|
|
|
|
|
},
|
|
|
|
|
pdfFileType: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => ['pdf', 'PDF'],
|
|
|
|
|
default: () => ["bmp", "gif", "jpg", "jpeg", "png", "mp4", "avi", "rmvb"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
@ -1470,11 +1382,6 @@ export default {
|
|
|
|
|
uploadHide: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
},
|
|
|
|
|
/* 蓝牙连接文件 */
|
|
|
|
|
we200BluetoothConnectFile: {
|
|
|
|
|
uploadHide: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
},
|
|
|
|
|
/* 小程序可见标签 */
|
|
|
|
|
miniProgramTag: {
|
|
|
|
|
instrumentId: null,
|
|
|
|
|
@ -1559,6 +1466,7 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
/** 初次护理规则 */
|
|
|
|
|
imageFileType: ['png', 'jpg', 'jpeg', 'gif'],
|
|
|
|
|
nurseIndex: 0,
|
|
|
|
|
nurseList: [
|
|
|
|
|
{
|
|
|
|
|
@ -1596,7 +1504,6 @@ export default {
|
|
|
|
|
instrumentId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
link: null,
|
|
|
|
|
save: false,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
@ -1617,12 +1524,10 @@ export default {
|
|
|
|
|
/** 查询仪器列列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
listInstrument(this.queryParams)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
listInstrument(this.queryParams).then((response) => {
|
|
|
|
|
this.instrumentList = response.rows
|
|
|
|
|
this.total = response.total
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -1698,9 +1603,6 @@ export default {
|
|
|
|
|
we200IotVersion: null,
|
|
|
|
|
we200IotUpgradeData: null,
|
|
|
|
|
we200IotVersionUpgrade: null,
|
|
|
|
|
we200BluetoothConnecting: null,
|
|
|
|
|
we200BluetoothConnectingTitle: null,
|
|
|
|
|
we200BluetoothConnectingContent: null,
|
|
|
|
|
}
|
|
|
|
|
/* 仪器封面 */
|
|
|
|
|
this.bannerFile = {
|
|
|
|
|
@ -1795,9 +1697,9 @@ export default {
|
|
|
|
|
this.open = true
|
|
|
|
|
this.title = '添加仪器列'
|
|
|
|
|
/* 所有模式选项 */
|
|
|
|
|
this.mode.modeIdsOptions = []
|
|
|
|
|
this.mode.modeIdsOptions = [];
|
|
|
|
|
listAllMode({
|
|
|
|
|
instrumentType: this.form.type,
|
|
|
|
|
instrumentType: this.form.type
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
|
this.$message.error('模式获取失败')
|
|
|
|
|
@ -1893,15 +1795,6 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we200蓝牙连接文件 */
|
|
|
|
|
if (this.form.we200BluetoothConnecting != null) {
|
|
|
|
|
this.we200BluetoothConnectFile = {
|
|
|
|
|
uploadHide: true,
|
|
|
|
|
fileList: [
|
|
|
|
|
{ name: 'we200蓝牙连接文件', url: this.form.we200BluetoothConnecting },
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 额外打卡时间
|
|
|
|
|
if (this.form.isExtraClock == 1) {
|
|
|
|
|
this.form.extraClockTimeRange = response.data.extraClockTimeRange
|
|
|
|
|
@ -1925,7 +1818,7 @@ export default {
|
|
|
|
|
this.mode.modeIdsOptions = []
|
|
|
|
|
listAllMode({
|
|
|
|
|
instrumentType: this.form.type,
|
|
|
|
|
instrumentModel: this.form.model,
|
|
|
|
|
instrumentModel: this.form.model
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
|
this.$message.error('模式获取失败')
|
|
|
|
|
@ -1940,60 +1833,21 @@ export default {
|
|
|
|
|
let temp = []
|
|
|
|
|
for (let i = 0; i < this.form.modeIdsValue.length; i++) {
|
|
|
|
|
let filterModeArr = this.mode.modeIdsOptions.filter(
|
|
|
|
|
(item) =>
|
|
|
|
|
item !== undefined && this.form.modeIdsValue[i] === item.id
|
|
|
|
|
(item) => item !== undefined && this.form.modeIdsValue[i] === item.id
|
|
|
|
|
)
|
|
|
|
|
if (filterModeArr !== undefined && filterModeArr.length > 0) {
|
|
|
|
|
if(filterModeArr !== undefined && filterModeArr.length > 0) {
|
|
|
|
|
temp.push(filterModeArr[0])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (temp !== undefined && temp.length > 0) {
|
|
|
|
|
if(temp !== undefined && temp.length > 0) {
|
|
|
|
|
this.newModeOptionList = temp
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// IOT版本升级介绍
|
|
|
|
|
this.form.iotVersionUpgrade = decodeURIComponent(
|
|
|
|
|
this.form.iotVersionUpgrade
|
|
|
|
|
)
|
|
|
|
|
// WE200IOT版本升级介绍
|
|
|
|
|
this.form.iotVersionUpgrade = decodeURIComponent(
|
|
|
|
|
this.form.we200IotVersionUpgrade
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
// 初次护理弹窗检验
|
|
|
|
|
for (let i = 0; i < this.nurseList.length; i++) {
|
|
|
|
|
if (this.nurseList[i].file != '' || this.nurseList[i].message != '') {
|
|
|
|
|
if (this.nurseList[i].file == '') {
|
|
|
|
|
this.$modal.msgError('请上传初次护理弹窗提示视频或图片')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.nurseList[i].message == '') {
|
|
|
|
|
this.$modal.msgError('请输入初次护理规则提示内容')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 仪器介绍校验
|
|
|
|
|
for (let i = 0; i < this.introduceList.length; i++) {
|
|
|
|
|
if (
|
|
|
|
|
this.introduceList[i].file != '' ||
|
|
|
|
|
this.introduceList[i].message != ''
|
|
|
|
|
) {
|
|
|
|
|
if (this.introduceList[i].file == '') {
|
|
|
|
|
this.$modal.msgError('请上传仪器介绍弹窗提示视频或图片')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.introduceList[i].message == '') {
|
|
|
|
|
this.$modal.msgError('请输入仪器介绍规则提示内容')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.nurseList = this.nurseList
|
|
|
|
|
this.form.introduceList = this.introduceList
|
|
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
|
|
@ -2089,7 +1943,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.serial = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 手写绑定介绍视频/图片 操作 */
|
|
|
|
|
@ -2100,7 +1954,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.manualCodeBinding = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 扫码绑定介绍视频/图片 操作 */
|
|
|
|
|
@ -2111,7 +1965,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.scanCodeBinding = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* iot升级数据文件 */
|
|
|
|
|
@ -2122,7 +1976,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.iotUpgradeData = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* iot升级数据文件 */
|
|
|
|
|
@ -2133,7 +1987,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.we200IotUpgradeData = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* 蓝牙连接图片 */
|
|
|
|
|
@ -2144,7 +1998,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.bluetoothConnecting = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* 蓝牙断开连接图片 */
|
|
|
|
|
@ -2155,7 +2009,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.bluetoothConnectFail = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* 蓝牙断开连接图片 */
|
|
|
|
|
@ -2166,18 +2020,7 @@ export default {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.bluetoothClosed = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* we200蓝牙连接图片 */
|
|
|
|
|
we200BluetoothConnectUploadExceed(files, fileList) {
|
|
|
|
|
this.$message.warning(`您已上传了文件,如需更换,请先删除原上传的文件`)
|
|
|
|
|
},
|
|
|
|
|
we200BluetoothConnectUploadSuccess(response, file) {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.form.we200BluetoothConnecting = response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/* 是否开启额外打卡奖励 */
|
|
|
|
|
@ -2191,70 +2034,47 @@ export default {
|
|
|
|
|
typeChange() {
|
|
|
|
|
// 非IOT仪器
|
|
|
|
|
if (this.form.type == 1) {
|
|
|
|
|
this.form.model = null
|
|
|
|
|
this.form.nursingTime = null
|
|
|
|
|
this.form.iotVersion = null
|
|
|
|
|
this.form.iotUpgradeData = null
|
|
|
|
|
this.form.bluetoothConnecting = null
|
|
|
|
|
this.form.bluetoothConnectingTitle = null
|
|
|
|
|
this.form.bluetoothConnectingContent = null
|
|
|
|
|
this.form.bluetoothConnectFail = null
|
|
|
|
|
this.form.bluetoothConnectFailTitle = null
|
|
|
|
|
this.form.bluetoothConnectFailContent = null
|
|
|
|
|
this.form.bluetoothClosed = null
|
|
|
|
|
this.form.bluetoothClosedTitle = null
|
|
|
|
|
this.form.bluetoothClosedContent = null
|
|
|
|
|
this.form.iotVersionUpgrade = null
|
|
|
|
|
this.form.modeIdsValue = []
|
|
|
|
|
this.form.model = null;
|
|
|
|
|
this.form.nursingTime = null;
|
|
|
|
|
this.form.iotVersion = null;
|
|
|
|
|
this.form.iotUpgradeData = null;
|
|
|
|
|
this.form.bluetoothConnecting = null;
|
|
|
|
|
this.form.bluetoothConnectingTitle = null;
|
|
|
|
|
this.form.bluetoothConnectingContent = null;
|
|
|
|
|
this.form.bluetoothConnectFail = null;
|
|
|
|
|
this.form.bluetoothConnectFailTitle = null;
|
|
|
|
|
this.form.bluetoothConnectFailContent = null;
|
|
|
|
|
this.form.bluetoothClosed = null;
|
|
|
|
|
this.form.bluetoothClosedTitle = null;
|
|
|
|
|
this.form.bluetoothClosedContent = null;
|
|
|
|
|
this.form.iotVersionUpgrade = null;
|
|
|
|
|
} else {
|
|
|
|
|
this.form.model = 'WL200'
|
|
|
|
|
this.form.modeIdsValue = []
|
|
|
|
|
this.form.model = 'WL200';
|
|
|
|
|
}
|
|
|
|
|
/* 模式选项 */
|
|
|
|
|
this.mode.modeIdsOptions = []
|
|
|
|
|
this.mode.modeIdsOptions = [];
|
|
|
|
|
listAllMode({
|
|
|
|
|
instrumentType: this.form.type,
|
|
|
|
|
instrumentModel: this.form.model,
|
|
|
|
|
instrumentModel: this.form.model
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
|
this.$message.error('模式获取失败')
|
|
|
|
|
}
|
|
|
|
|
this.mode.modeIdsOptions = response.data
|
|
|
|
|
})
|
|
|
|
|
this.form.we200IotVersion = null;
|
|
|
|
|
this.form.we200IotUpgradeData = null;
|
|
|
|
|
this.form.we200IotVersionUpgrade = null;
|
|
|
|
|
this.we200BluetoothConnectFile = {
|
|
|
|
|
uploadHide: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
},
|
|
|
|
|
this.form.we200BluetoothConnecting = null;
|
|
|
|
|
this.form.we200BluetoothConnectingTitle = null;
|
|
|
|
|
this.form.we200BluetoothConnectingContent = null;
|
|
|
|
|
},
|
|
|
|
|
modelChange() {
|
|
|
|
|
/* 模式选项 */
|
|
|
|
|
this.mode.modeIdsOptions = []
|
|
|
|
|
this.mode.modeIdsOptions = [];
|
|
|
|
|
listAllMode({
|
|
|
|
|
instrumentType: this.form.type,
|
|
|
|
|
instrumentModel: this.form.model,
|
|
|
|
|
instrumentModel: this.form.model
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
|
this.$message.error('模式获取失败')
|
|
|
|
|
}
|
|
|
|
|
this.mode.modeIdsOptions = response.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.form.we200IotVersion = null;
|
|
|
|
|
this.form.we200IotUpgradeData = null;
|
|
|
|
|
this.form.we200IotVersionUpgrade = null;
|
|
|
|
|
this.we200BluetoothConnectFile= {
|
|
|
|
|
uploadHide: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
},
|
|
|
|
|
this.form.we200BluetoothConnecting = null;
|
|
|
|
|
this.form.we200BluetoothConnectingTitle = null;
|
|
|
|
|
this.form.we200BluetoothConnectingContent = null;
|
|
|
|
|
},
|
|
|
|
|
/* 是否购买切换 */
|
|
|
|
|
isPurchaseChang() {
|
|
|
|
|
@ -2497,7 +2317,6 @@ export default {
|
|
|
|
|
instrumentId: this.instrumentInstructions.instrumentId,
|
|
|
|
|
name: null,
|
|
|
|
|
link: null,
|
|
|
|
|
save: false,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
editInstrumentInstructionVisible(row) {
|
|
|
|
|
@ -2543,24 +2362,19 @@ export default {
|
|
|
|
|
this.addInstrumentInstructionLine()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
saveInstrumentInstruction(item, index) {
|
|
|
|
|
saveInstrumentInstruction(item) {
|
|
|
|
|
if (item.instrumentId == null) {
|
|
|
|
|
this.$modal.msgError('参数异常')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (item.name == null || item.name.trim().length === 0) {
|
|
|
|
|
this.$modal.msgError('请输入说明书类型')
|
|
|
|
|
if (item.name == null) {
|
|
|
|
|
this.$modal.msgError('请输入说明书名称')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (item.link == null) {
|
|
|
|
|
this.$modal.msgError('请上传说明书')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let pattern = /^[a-zA-Z0-9]+$/
|
|
|
|
|
if (!pattern.test(item.name)) {
|
|
|
|
|
this.$modal.msgError('说明书类型只能为数字和英文的组合')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (item.id != null) {
|
|
|
|
|
updateInstructions(item).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess('修改成功')
|
|
|
|
|
@ -2568,7 +2382,6 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
addInstructions(item).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess('新增成功')
|
|
|
|
|
item.save = true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -2580,7 +2393,7 @@ export default {
|
|
|
|
|
this.instrumentInstructions.instructionList[index].link =
|
|
|
|
|
response.data.url
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('文件上传失败')
|
|
|
|
|
this.$message.error('图片插入失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
viewInstrumentInstruction(item) {
|
|
|
|
|
@ -2589,7 +2402,7 @@ export default {
|
|
|
|
|
copyInstructionNameUrl(item) {
|
|
|
|
|
navigator.clipboard.writeText(item.nameUrl).then(() => {
|
|
|
|
|
this.$message.success('已成功复制到剪贴板')
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/* 模式 */
|
|
|
|
|
openModeIdDialog() {
|
|
|
|
|
@ -2633,72 +2446,25 @@ export default {
|
|
|
|
|
// 上传前校检格式和大小
|
|
|
|
|
handleBeforeUpload(file) {
|
|
|
|
|
// 校检文件类型
|
|
|
|
|
const fileName = file.name.split('.')
|
|
|
|
|
const fileExt = fileName[fileName.length - 1]
|
|
|
|
|
const isImageTypeOk = this.imageFileType.indexOf(fileExt) >= 0
|
|
|
|
|
const isVideoTypeOk = this.videoFileType.indexOf(fileExt) >= 0
|
|
|
|
|
if (!(isImageTypeOk || isVideoTypeOk)) {
|
|
|
|
|
this.$modal.msgError(`文件格式不正确`)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
// 校检文件大小
|
|
|
|
|
if (isImageTypeOk) {
|
|
|
|
|
const isLt = file.size / 1024 / 1024 < this.imageFileSize
|
|
|
|
|
if (!isLt) {
|
|
|
|
|
this.$modal.msgError(`上传图片大小不能超过 ${this.imageFileSize} MB!`)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (isVideoTypeOk) {
|
|
|
|
|
const isLt = file.size / 1024 / 1024 < this.videoFileSize
|
|
|
|
|
if (!isLt) {
|
|
|
|
|
this.$modal.msgError(`上传视频大小不能超过 ${this.videoFileSize} MB!`)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
pdfHandleBeforeUpload(file) {
|
|
|
|
|
// 校检文件类型
|
|
|
|
|
if (this.pdfFileType) {
|
|
|
|
|
const fileName = file.name.split('.')
|
|
|
|
|
const fileExt = fileName[fileName.length - 1]
|
|
|
|
|
const isTypeOk = this.pdfFileType.indexOf(fileExt) >= 0
|
|
|
|
|
if (this.fileType) {
|
|
|
|
|
const fileName = file.name.split('.');
|
|
|
|
|
const fileExt = fileName[fileName.length - 1];
|
|
|
|
|
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
|
|
|
|
|
if (!isTypeOk) {
|
|
|
|
|
this.$modal.msgError(`说明书文件类型只能为PDF格式`)
|
|
|
|
|
return false
|
|
|
|
|
this.$modal.msgError(`文件格式不正确`);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 校检文件大小
|
|
|
|
|
if (this.pdfFileSize) {
|
|
|
|
|
const isLt = file.size / 1024 / 1024 < this.pdfFileSize
|
|
|
|
|
if (this.fileSize) {
|
|
|
|
|
const isLt = file.size / 1024 / 1024 < this.fileSize;
|
|
|
|
|
if (!isLt) {
|
|
|
|
|
this.$modal.msgError(`上传文件大小不能超过 ${this.pdfFileSize} MB!`)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 校验文件名
|
|
|
|
|
var regex = /^[a-zA-Z0-9\-_.]+$/
|
|
|
|
|
if (!regex.test(file.name)) {
|
|
|
|
|
this.$modal.msgError(
|
|
|
|
|
`文件名只能由字母、数字、以及一些常用的特殊符号(比如连字符、下划线和点号等)组成`
|
|
|
|
|
)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
handleBeforeUploadImage(file) {
|
|
|
|
|
let fileType = ['jpg', 'png', 'JPG', 'PNG']
|
|
|
|
|
const fileName = file.name.split('.')
|
|
|
|
|
const fileExt = fileName[fileName.length - 1]
|
|
|
|
|
const isTypeOk = fileType.indexOf(fileExt) >= 0
|
|
|
|
|
if (!isTypeOk) {
|
|
|
|
|
this.$modal.msgError(`文件类型只能为jpg格式/png格式`)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
@ -2731,41 +2497,41 @@ video {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -140px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.iotVersion-absolute-info {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -84px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.iotUpgradeData-absolute-info {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -140px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.we200-absolute-info {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -183px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.we200-iotVersion-absolute-info {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -128px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.we200-iotUpgradeData-absolute-info {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
left: -184px;
|
|
|
|
|
color: #faad14;
|
|
|
|
|
color: #FAAD14;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|