<template>
|
<view class="template-job tn-safe-area-inset-bottom tn-skeleton">
|
|
<!-- 顶部自定义导航 -->
|
<tn-nav-bar fixed style="position: absolute;z-index: 999999999;" alpha customBack>
|
<view slot="right" class='tn-custom-nav-bar__back' @click="goBack">
|
|
<text style="margin-right: 20px;">新增</text>
|
<!-- <text class='tn-icon add'></text> -->
|
</view>
|
<!-- <text class="title_linespan" @click="goAchor">基站</text> -->
|
<text v-if="isAchor==false" class="title_linespan" style="margin-left: 10px;" @click="goAchor">终端管理</text>
|
<text v-else class="title_linespan" style="margin-left: 10px;" @click="goTag">终端管理</text>
|
</tn-nav-bar>
|
|
<view v-show="lock==false" class="page-wrap u-skeleton">
|
<view style="display: flex;width: 50%;left: 5%"
|
:style="{display:'flex', top: topheight+'px',position: 'absolute',width: '50%',left: '5%'}">
|
|
<view style="color: #00aaff;">在线:{{online}}</view>
|
<view style="color: #00aaff;margin-left: 20px;">离线:{{offline}}</view>
|
</view>
|
<data-list :width="width" class="data-list" ref="list" @load="handleLoad" @refresh="handleRefresh"
|
style="margin-top: 90px;">
|
|
<view v-for="(item, index) in list" :key="index">
|
<tn-button shape="icon" class="tn-icon-edit" style="position: absolute;left: 85%;" size="lg"
|
@click="editClick(item,index)"></tn-button>
|
<view style="display: flex;margin-top: 12px;" class="flex flex-direction">
|
<u-badge v-if="item.online==1" style="margin-top: 8px;margin-right: 8px;" :isDot="true"
|
type="success"></u-badge>
|
<u-badge v-else style="margin-top: 8px;margin-right: 8px;" :isDot="true" type="info"></u-badge>
|
<view>编号:{{item.tagid}}</view>
|
<view style="margin-left: 20px;">名称:{{item.personname}}</view>
|
<!-- <view v-if="item.ponline==1" style="margin-left: 20px;">在线</view>
|
<view v-else style="margin-left: 20px;">离线</view> -->
|
<view style="margin-left: 20px;">
|
版本:{{item.version==null ? '未知' : item.version}}</view>
|
<!-- <view style="margin-left: 20px;">电量:{{item.ppower}}%</view> -->
|
</view>
|
<view style="display: flex;margin-left: 14px;margin-bottom: 10px;">
|
<view style="color: #5e5e5e;">终端类型:{{item.type}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">{{item.psex}}</view> -->
|
<view style="margin-left: 14px;color: #5e5e5e;">作业计划:{{item.department}}</view>
|
</view>
|
<!-- <view style="display: flex;">
|
<view style="margin-bottom: 10px;font-size: 16px;">卡号:{{detailform.baoliu1}}</view>
|
<image src="../../static/img/fuzhi.png" style="width:20px;height:20px;"
|
@click="copyInfo(detailform.baoliu1)">
|
</image>
|
</view> -->
|
|
<view style="display: flex;margin-left: 14px;margin-bottom: 10px;">
|
<view v-if="item.mestagid=='-1' || item.mestagid==null" style="color: #5e5e5e;">提醒终端:无</view>
|
<view v-else style="color: #5e5e5e;">提醒终端:{{item.mestagid}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">{{item.psex}}</view> -->
|
<view v-if="item.bisuoid=='-1' || item.bisuoid==null" style="margin-left: 14px;color: #5e5e5e;">
|
联动闭锁:无</view>
|
<view v-else style="margin-left: 14px;color: #5e5e5e;">联动闭锁:{{item.bisuoid}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">联动闭锁:{{item.bisuoid}}</view> -->
|
<view v-if="item.sound=='-1' || item.sound==null" style="margin-left: 14px;color: #5e5e5e;">
|
声光报警器:无</view>
|
<view v-else style="color: #5e5e5e;">声光报警器:{{item.sound}}</view>
|
<view
|
style="position: absolute;left: 85%;font-size: 12px;border-radius: 4px; background-color: rgba(0, 170, 255, 0.5);padding: 5px;"
|
@click="positionclick(item.lat ,item.lon)">定位</view>
|
</view>
|
<view style="display: flex;margin-left: 14px;margin-bottom: 10px;">
|
<view v-if="item.ccid=='-1' || item.ccid==null" style="color: #5e5e5e;">卡号:无</view>
|
<view v-else style="color: #5e5e5e;">卡号:{{item.ccid}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">{{item.psex}}</view> -->
|
<image v-if="item.ccid!='-1' && item.ccid!=null" src="../../static/img/fuzhi.png"
|
style="width:20px;height:20px;" @click="copyInfo(item.ccid)">
|
</image>
|
</view>
|
<view style="display: flex;margin-left: 14px;margin-bottom: 10px;">
|
<view style="color: #5e5e5e;">加密:{{item.encryption}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">{{item.psex}}</view> -->
|
<view style="margin-left: 14px;color: #5e5e5e;">差分数据源:{{item.rtcm}}</view>
|
</view>
|
<view style="display: flex;margin-left: 14px;margin-bottom: 12px;">
|
<view style=" color: #5e5e5e;">时间:{{item.addtime}}</view>
|
<!-- <view style="margin-left: 14px;color: #5e5e5e;">{{item.psex}}</view> -->
|
|
</view>
|
|
<u-line style="margin-left: 14px;"></u-line>
|
</view>
|
</data-list>
|
</view>
|
<u-modal style="position: absolute;z-index: 99999999999999;" buttonReverse confirmText="保存" cancelText="取消"
|
:show="showpopup" @cancel="cancelmodal" @confirm="submitForm" ref="uModal" :showCancelButton="true"
|
:closeOnClickOverlay="true">
|
<!-- <tn-popup v-model="showpopup" mode="bottom" closeBtn>
|
<view class="page-wrap u-skeleton"> -->
|
<!-- <view class="item-wrap"> -->
|
<!-- <view style="max-height: 300px; overflow-y: auto;"> -->
|
<u-form>
|
<u-form-item label="编号:" :labelWidth="labelWidth">
|
<u-input :disabled="disabled" v-model="form.tagid" inputAlign="right"
|
placeholder="请输入编号"></u-input>
|
</u-form-item>
|
<u-form-item label="名称:" :labelWidth="labelWidth">
|
<u-input v-model="form.personname" inputAlign="right" placeholder="请输入名称"></u-input>
|
</u-form-item>
|
<u-form-item label="加密:" :labelWidth="labelWidth" @click="show6 = true">
|
<!-- <tn-input v-model="form.encryption" inputAlign="right" placeholder="请输入内容"></tn-input> -->
|
<!-- <tn-input v-model="form.encryption" type="select" @click="show6 = true" placeholder="请选择是否加密" /> -->
|
<!-- <tn-action-sheet :list="encryptionList" v-model="show6"
|
@click="encryptionCallback"></tn-action-sheet> -->
|
<u-input v-model="form.encryption" disabled disabledColor="#ffffff" placeholder="请选择是否加密"
|
border="none" />
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
<tn-select v-model="show6" mode="single" :list="encryptionList" @confirm="encryptionCallback"
|
:searchShow="true"></tn-select>
|
</u-form-item>
|
<u-form-item label="持有类型:" :labelWidth="labelWidth" @click="show3 = true">
|
<!-- <tn-input v-model="form.type" type="select" @click="show3 = true" placeholder="请选择类型" /> -->
|
<u-input v-model="form.type" disabled disabledColor="#ffffff" placeholder="请选择类型" border="none" />
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
<!-- <tn-action-sheet :list="typeList" v-model="show3" @click="typeCallback"></tn-action-sheet> -->
|
<tn-select v-model="show3" mode="single" :list="typeList" @confirm="typeCallback"
|
:searchShow="true"></tn-select>
|
</u-form-item>
|
<u-form-item label="终端类型:" :labelWidth="labelWidth" @click="show2 = true">
|
<!-- <tn-input v-model="form.baoliu1" type="select" @click="show2 = true" placeholder="请选择类型" /> -->
|
<u-input v-model="form.baoliu1" disabled disabledColor="#ffffff" placeholder="请选择类型"
|
border="none" />
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
<!-- <tn-action-sheet :list="holdtypeList" v-model="show2" @click="holdtypeCallback"></tn-action-sheet> -->
|
<tn-select v-model="show2" mode="single" :list="holdtypeList" @confirm="holdtypeCallback"
|
:searchShow="true"></tn-select>
|
</u-form-item>
|
|
<u-form-item label="关联作业:" :labelWidth="labelWidth" @click="show1 = true">
|
<!-- <tn-input v-model="form.department" type="select" @click="show1 = true" placeholder="请选择关联作业" /> -->
|
<u-input v-model="form.department" disabled disabledColor="#ffffff" placeholder="请选择关联作业"
|
border="none" />
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
<!-- <tn-action-sheet :list="bumenList" v-model="show1" @click="bymenCallback"></tn-action-sheet> -->
|
|
<tn-select v-model="show1" mode="single" :list="bumenList" @confirm="bymenCallback"
|
:searchShow="true"></tn-select>
|
</u-form-item>
|
|
<u-form-item label="提醒终端:" :labelWidth="labelWidth">
|
<!-- <u-badge v-if="tixingonlie==1 && form.mestagid!=''" :isDot="true" type="success"></u-badge>
|
<u-badge v-else-if="tixingonlie==0 && form.mestagid!=''" :isDot="true" type="info"></u-badge> -->
|
|
<!-- <tn-input clearable v-model="form.mestagid" type="select" @click="show4 = true" placeholder="请选择提醒终端" />
|
<tn-action-sheet :list="tixinglist" v-model="show4" @click="tixingCallback"></tn-action-sheet> -->
|
<!-- <tn-input v-model="form.mestagid" inputAlign="right" placeholder="请输入提醒标签"></tn-input> -->
|
<zxz-uni-data-select v-model="value1" multiple dataKey="lable" dataValue="value"
|
:localdata="tixinglist" clear @change="change"></zxz-uni-data-select>
|
<!-- <mySelectCheckbox v-model="form.mestagid" multiple dataKey="text" dataValue="value" :localdata="tixinglist"
|
clear @change="change"></mySelectCheckbox> -->
|
</u-form-item>
|
|
<u-form-item label="联动闭锁:" :labelWidth="labelWidth">
|
<!-- <u-badge v-if="bisuoonlie==1 && form.mestagid!=''" :isDot="true" type="success"></u-badge>
|
<u-badge v-else-if="tixingonlie==0 && form.mestagid!=''" :isDot="true" type="info"></u-badge> -->
|
<!-- <tn-input v-model="form.bisuoid" inputAlign="right" placeholder="请输入联动闭锁"></tn-input> -->
|
<!-- <tn-input v-model="form.bisuoid" type="select" @click="show5 = true" placeholder="请选择联动闭锁" />
|
<tn-action-sheet :list="bisuolist" v-model="show5" @click="bisuoCallback"></tn-action-sheet> -->
|
<zxz-uni-data-select v-model="value2" multiple dataKey="lable" dataValue="value"
|
:localdata="bisuolist" clear @change="change1"></zxz-uni-data-select>
|
<!-- <mySelectCheckbox v-model="form.bisuoid" multiple dataKey="value" dataValue="value" :localdata="bisuolist"
|
clear style="margin-right: -10px;" ></mySelectCheckbox> -->
|
</u-form-item>
|
|
<u-form-item label="声光报警器:" :labelWidth="labelWidth">
|
<!-- <u-badge v-if="soundonlie==1 && form.sound!=''" :isDot="true" type="success"></u-badge>
|
<u-badge v-else-if="soundonlie==0 && form.sound!=''" :isDot="true" type="info"></u-badge> -->
|
<!-- <tn-input v-model="form.bisuoid" inputAlign="right" placeholder="请输入联动闭锁"></tn-input> -->
|
<!-- <tn-input v-model="form.bisuoid" type="select" @click="show5 = true" placeholder="请选择联动闭锁" />
|
<tn-action-sheet :list="bisuolist" v-model="show5" @click="bisuoCallback"></tn-action-sheet> -->
|
<!-- <zxz-uni-data-select v-model="value3" multiple dataKey="lable" dataValue="value"
|
:localdata="soundlist" clear @change="change2"></zxz-uni-data-select> -->
|
<!-- <mySelectCheckbox v-model="form.bisuoid" multiple dataKey="value" dataValue="value" :localdata="bisuolist"
|
clear style="margin-right: -10px;" ></mySelectCheckbox> -->
|
</u-form-item>
|
|
<u-form-item >
|
<!-- <u-badge v-if="soundonlie==1 && form.sound!=''" :isDot="true" type="success"></u-badge>
|
<u-badge v-else-if="soundonlie==0 && form.sound!=''" :isDot="true" type="info"></u-badge> -->
|
<!-- <tn-input v-model="form.bisuoid" inputAlign="right" placeholder="请输入联动闭锁"></tn-input> -->
|
<!-- <tn-input v-model="form.bisuoid" type="select" @click="show5 = true" placeholder="请选择联动闭锁" />
|
<tn-action-sheet :list="bisuolist" v-model="show5" @click="bisuoCallback"></tn-action-sheet> -->
|
<zxz-uni-data-select v-model="value3" multiple dataKey="lable" dataValue="value"
|
:localdata="soundlist" clear @change="change2"></zxz-uni-data-select>
|
<!-- <mySelectCheckbox v-model="form.bisuoid" multiple dataKey="value" dataValue="value" :localdata="bisuolist"
|
clear style="margin-right: -10px;" ></mySelectCheckbox> -->
|
</u-form-item>
|
|
</u-form>
|
<!-- </view> -->
|
<!-- </view>
|
<button style="margin-top: 20px;" type="primary" @click="submitForm">保存围栏</button> -->
|
</u-modal>
|
<!-- </tn-popup> -->
|
<tn-skeleton :show="showSkeleton"></tn-skeleton>
|
<successCom ref="refSuccess"></successCom>
|
</view>
|
</template>
|
|
<script>
|
import successCom from '@/components/success.vue'
|
import mySelectCheckbox from './my-selelctCheckbox.vue'
|
import {
|
minLogin
|
} from '@/js/minLogin.js'
|
import {
|
findbisuo,
|
findtixing,
|
findsound,
|
saveper,
|
updateper,
|
findbumen,
|
findTag
|
} from '@/config/api.js';
|
import {
|
pagesEquipment
|
} from '@/js/pages/equipment.js'
|
export default {
|
mixins: [minLogin, pagesEquipment],
|
components: {
|
mySelectCheckbox,
|
successCom
|
},
|
data() {
|
return {
|
value3: '',
|
value2: '',
|
value1: '',
|
show5: false,
|
show4: false,
|
show3: false,
|
show2: false,
|
labelWidth: 200,
|
show1: false,
|
disabled: false,
|
show6: false,
|
encryptionList: [{
|
value: '是',
|
label: '是'
|
},
|
|
{
|
value: '否',
|
label: '否'
|
}
|
],
|
holdtypeList: [{
|
value: '手持标签',
|
label: '手持标签'
|
},
|
|
{
|
value: '车载标签',
|
label: '车载标签'
|
},
|
|
{
|
value: '高精度工卡',
|
label: '高精度工卡'
|
},
|
{
|
value: '提醒标签',
|
label: '提醒标签'
|
},
|
{
|
value: '闭锁装置',
|
label: '闭锁装置'
|
},
|
{
|
value: '声光报警器',
|
label: '声光报警器'
|
}
|
],
|
typeList: [{
|
value: '工作负责人',
|
label: '工作负责人'
|
},
|
|
{
|
value: '专责监护人',
|
label: '专责监护人'
|
},
|
|
{
|
value: '登高作业人',
|
label: '登高作业人'
|
},
|
{
|
value: '一般作业人',
|
label: '一般作业人'
|
},
|
{
|
value: '吊车',
|
label: '吊车'
|
},
|
{
|
value: '斗臂车',
|
label: '斗臂车'
|
},
|
|
{
|
value: '挖掘机',
|
label: '挖掘机'
|
}, {
|
value: '泵车',
|
label: '泵车'
|
}, {
|
value: '一般车辆',
|
label: '一般车辆'
|
},
|
|
],
|
|
showpopup: false,
|
form: {
|
baoliu1: '',
|
tagid: '',
|
encryption: '',
|
personname: '',
|
department: '',
|
type: '',
|
mestagid: '',
|
sound: '',
|
company: '',
|
alterPerson: '',
|
perCompany: '',
|
bisuoid: ''
|
},
|
width: '40%',
|
online: 0,
|
offline: 0,
|
isAchor: false,
|
warnindex: 0,
|
warlist: {},
|
lock: false,
|
keyword: '',
|
pageNo: 1,
|
pageSize: 10,
|
imgStyle: {
|
width: '100px',
|
height: '1000px',
|
borderRadius: '50%'
|
},
|
showSkeleton: true,
|
options: [{
|
text: '删除',
|
style: {
|
backgroundColor: '#F93737',
|
}
|
}, ],
|
bumenList: [],
|
tixinglist: [],
|
tixingonlie: '',
|
bisuoonlie: '',
|
bisuolist: [],
|
|
soundlist: [],
|
soundonlie: '',
|
boxKey: 0,
|
scrollHeight: 500,
|
topheight: 0,
|
paddingTop: 60,
|
emitDate: 'indexHome',
|
show: false,
|
time: '',
|
list: [],
|
total: 0,
|
options1: [{
|
text: '删除',
|
style: {
|
backgroundColor: '#F93737'
|
}
|
}]
|
}
|
},
|
computed: {
|
countList() {
|
let num = 0;
|
for (let i in this.list) {
|
num += this.list[i].fQty;
|
}
|
return num;
|
}
|
},
|
mounted() {
|
this.findsoundall()
|
this.findbisuoall()
|
this.findbumenall()
|
this.findtixingall()
|
|
this.topheight = this.vuex_custom_bar_height + 15
|
setTimeout(() => {
|
this.showSkeleton = false
|
}, 1000)
|
this.scrollHeight = this.screenHeight - 282;
|
|
setTimeout(() => {
|
this.paddingTop = this.vuex_padding_top
|
this.paddingTop += 5
|
}, 400)
|
|
},
|
methods: {
|
copyInfo(e) {
|
// this.gettime()
|
let _this = this
|
uni.setClipboardData({
|
data: e,
|
success: function() {
|
// _this.info = '复制信息成功'+formatDate(new Date(), 'hh:mm:ss')
|
uni.showToast({
|
title: '复制成功',
|
icon: 'success',
|
duration: 2000
|
});
|
}
|
});
|
},
|
change(e) {
|
let va = ''
|
for (var i = 0; i < this.value1.length; i++) {
|
if (i == this.value1.length - 1) {
|
va += this.value1[i]
|
} else {
|
va += this.value1[i] + ";"
|
}
|
|
}
|
if (va == '') {
|
this.form.mestagid = '-1'
|
} else {
|
this.form.mestagid = va
|
}
|
},
|
change1(e) {
|
let va = ''
|
for (var i = 0; i < this.value2.length; i++) {
|
if (i == this.value2.length - 1) {
|
va += this.value2[i]
|
} else {
|
va += this.value2[i] + ";"
|
}
|
|
}
|
if (va == '') {
|
this.form.bisuoid = '-1'
|
} else {
|
this.form.bisuoid = va
|
}
|
},
|
change2(e) {
|
let va = ''
|
for (var i = 0; i < this.value3.length; i++) {
|
if (i == this.value3.length - 1) {
|
va += this.value3[i]
|
} else {
|
va += this.value3[i] + ";"
|
}
|
|
}
|
if (va == '') {
|
this.form.sound = '-1'
|
} else {
|
this.form.sound = va
|
}
|
},
|
|
|
positionclick(e, i) {
|
this.$emit('toposition', e + "," + i);
|
},
|
cancelmodal() {
|
this.value1 = ''
|
this.value2 = ''
|
this.value3 = ''
|
this.showpopup = false
|
},
|
//保存围栏
|
submitForm() {
|
|
if (this.disabled == true) {
|
//修改
|
this.form.company = this.company
|
this.form.percompany = this.company
|
this.form.alterPerson = this.vuex_user
|
updateper(this.form).then((res) => {
|
this.$refs.refSuccess.showBox({
|
type: 'success',
|
txt: "修改成功"
|
});
|
this.value3 = ''
|
this.value1 = ''
|
this.value2 = ''
|
this.showpopup = false
|
setTimeout(() => {
|
this.handleRefresh({
|
page: 1,
|
size: this.pageSize
|
}, () => {
|
// 可以在这里处理加载完成后的逻辑
|
});
|
this.findbisuoall()
|
this.findbumenall()
|
this.findtixingall()
|
this.findsoundall()
|
}, 1000)
|
|
|
})
|
} else {
|
//新增
|
if (this.form.mestagid == '') {
|
this.form.mestagid = '-1'
|
}
|
if (this.form.sound == '') {
|
this.form.sound = '-1'
|
}
|
|
if (this.form.bisuoid == '') {
|
this.form.bisuoid = '-1'
|
}
|
this.form.company = this.company
|
this.form.percompany = this.company
|
this.form.alterPerson = this.vuex_user
|
|
saveper(this.form).then((res) => {
|
this.$refs.refSuccess.showBox({
|
type: 'success',
|
txt: "保存成功"
|
});
|
this.showpopup = false
|
this.handleRefresh({
|
page: 1,
|
size: this.pageSize
|
}, () => {
|
// 可以在这里处理加载完成后的逻辑
|
});
|
this.findbisuoall()
|
this.findbumenall()
|
this.findtixingall()
|
this.findsoundall()
|
|
})
|
}
|
},
|
goBack() {
|
this.showpopup = true
|
this.disabled = false
|
this.form.personname = ''
|
this.form.encryption = ''
|
this.form.tagid = ''
|
this.form.department = ''
|
this.form.mestagid = ''
|
this.form.sound = ''
|
|
this.form.type = ''
|
this.form.bisuoid = ''
|
this.form.baoliu1 = ''
|
},
|
|
|
findbisuoall() {
|
if (this.vuex_is_login) {
|
const params = {
|
company: this.company,
|
juese: uni.getStorageSync('juese'),
|
}
|
findbisuo(params).then((res) => {
|
if (res.code == 0) {
|
this.bisuolist = res.data.map(item => ({
|
value: item.tagid,
|
lable: item.tagid,
|
line: item.online
|
}));
|
}
|
|
})
|
}
|
|
},
|
|
findsoundall() {
|
console.log(111111111111111111);
|
console.log(this.vuex_is_login);
|
if (this.vuex_is_login) {
|
const params = {
|
company: this.company,
|
juese: uni.getStorageSync('juese'),
|
}
|
console.log(params);
|
findsound(params).then((res) => {
|
console.log(res);
|
if (res.code == 0) {
|
this.soundlist = res.data.map(item => ({
|
value: item.deviceMac,
|
lable: item.deviceMac,
|
// line: item.online
|
}));
|
}
|
|
})
|
}
|
|
},
|
|
findtixingall() {
|
if (this.vuex_is_login) {
|
const params = {
|
company: this.company,
|
juese: uni.getStorageSync('juese'),
|
}
|
findtixing(params).then((res) => {
|
if (res.code == 0) {
|
this.tixinglist = res.data.map(item => ({
|
value: item.tagid,
|
lable: item.tagid,
|
line: item.online
|
}));
|
// } else {
|
// this.$refs.refSuccess.showBox({
|
// type: 'error',
|
// txt: res.msg
|
// });
|
}
|
})
|
}
|
|
},
|
|
findbumenall() {
|
if (this.vuex_is_login) {
|
const params = {
|
company: this.company,
|
juese: uni.getStorageSync('juese'),
|
}
|
findbumen(params).then((res) => {
|
if (res.code == 0) {
|
this.bumenList = res.data.map(item => ({
|
value: item.name,
|
label: item.name
|
}));
|
// } else {
|
// this.$refs.refSuccess.showBox({
|
// type: 'error',
|
// txt: res.msg
|
// });
|
}
|
})
|
}
|
|
},
|
bymenCallback(e) {
|
this.form.department = e[0].label
|
|
},
|
bisuoCallback(index) {
|
this.form.bisuoid = this.bisuolist[index].text;
|
this.bisuoonlie = this.bisuolist[index].value;
|
},
|
tixingCallback(index) {
|
this.form.mestagid = this.tixinglist[index].value;
|
this.tixingonlie = this.tixinglist[index].line;
|
},
|
soundCallback(index) {
|
this.form.sound = this.soundlist[index].value;
|
// this.soundonlie = this.soundlist[index].line;
|
},
|
|
typeCallback(e) {
|
this.form.type = e[0].label
|
},
|
encryptionCallback(e) {
|
this.form.encryption = e[0].label
|
},
|
|
holdtypeCallback(e) {
|
this.form.baoliu1 = e[0].label
|
},
|
editClick(e, i) {
|
this.editindex = i
|
this.showpopup = true
|
this.disabled = true
|
this.form.personname = e.personname
|
this.form.encryption = e.encryption
|
|
this.form.tagid = e.tagid
|
this.form.department = e.department
|
this.form.mestagid = e.mestagid
|
this.form.sound = e.sound
|
|
this.form.type = e.type
|
this.form.bisuoid = e.bisuoid
|
this.form.baoliu1 = e.baoliu1
|
if (e.mestagid != '-1' && e.mestagid != null) {
|
this.value1 = e.mestagid.split(";")
|
}
|
if (e.sound != '-1' && e.sound != null) {
|
this.value3 = e.sound.split(";")
|
}
|
if (e.bisuoid != '-1' && e.bisuoid != null) {
|
this.value2 = e.bisuoid.split(";")
|
}
|
|
|
},
|
goAchor() {
|
this.isAchor = false
|
this.$emit('goAchor');
|
},
|
goTag() {
|
this.isAchor = true
|
},
|
|
// 模拟请求加载数据
|
handleLoad(data, callback) {
|
const params = {
|
current: data.page,
|
size: data.size,
|
company: this.company,
|
juese: uni.getStorageSync('juese'),
|
}
|
if (this.vuex_is_login) {
|
findTag(params).then((res) => {
|
this.online = res.online
|
this.offline = res.offline
|
if (res.code == 0) {
|
let list = [];
|
setTimeout(() => {
|
let list = [];
|
for (var i = 0; i < res.data.records.length; i++) {
|
list.push(res.data.records[i]);
|
}
|
if (data.lock == true) {
|
this.list = []
|
}
|
this.list = [...this.list, ...list];
|
callback({
|
list: this.list,
|
total: res.data.total
|
});
|
}, 1500);
|
}
|
})
|
} else {
|
callback({
|
list: [],
|
total: 0
|
});
|
}
|
},
|
handleSearch(data, callback) {
|
const params = {
|
current: 1,
|
size: 10,
|
juese: uni.getStorageSync('juese'),
|
company: this.company,
|
}
|
if (this.vuex_is_login) {
|
findTag(params).then((res) => {
|
|
this.online = res.online
|
this.offline = res.offline
|
this.list = []
|
if (res.code == 0) {
|
let list = [];
|
setTimeout(() => {
|
let list = [];
|
for (var i = 0; i < res.data.records.length; i++) {
|
list.push(res.data.records[i]);
|
}
|
this.list = [...this.list, ...list];
|
callback({
|
list: this.list,
|
total: res.data.total
|
});
|
}, 1500);
|
}
|
})
|
}
|
},
|
// 模拟请求数据刷新
|
handleRefresh(data, callback) {
|
const params = {
|
current: data.page,
|
size: data.size,
|
objectid: data.objectid,
|
juese: uni.getStorageSync('juese'),
|
company: this.company,
|
}
|
if (this.vuex_is_login) {
|
findTag(params).then((res) => {
|
this.online = res.online
|
this.offline = res.offline
|
if (res.code == 0) {
|
let list = [];
|
setTimeout(() => {
|
let list = [];
|
for (var i = 0; i < res.data.records.length; i++) {
|
list.push(res.data.records[i]);
|
}
|
this.list = []
|
this.list = [...this.list, ...list];
|
callback({
|
list: this.list,
|
total: res.data.total
|
});
|
}, 1500);
|
}
|
})
|
}
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
/* 鼠标未悬浮时效果设置 */
|
.title_linespan {
|
font-size: 17px;
|
font-weight: bold;
|
color: #000000
|
}
|
|
/* 鼠标悬浮后的设置 */
|
.title_linespan:hover {
|
font-size: 17px;
|
font-weight: bold;
|
color: #00aaff;
|
text-decoration: underline;
|
}
|
|
.modal-btn {
|
position: absolute;
|
left: 75%;
|
}
|
|
.modal-btn::before {
|
content: "\2022";
|
/* Unicode 字符编码表示的圆点 */
|
color: #5f5f5f;
|
/* 可以设置圆点的颜色,这里是红色 */
|
// margin-right: 5px; /* 可以设置圆点与文字之间的距离 */
|
/* 如果需要更大的圆点,可以使用下面的属性 */
|
font-size: 20px;
|
/* 设置圆点的大小 */
|
}
|
|
.modal-btn2 {
|
position: absolute;
|
left: 75%;
|
}
|
|
.modal-btn2::before {
|
content: "\2022";
|
/* Unicode 字符编码表示的圆点 */
|
color: #00aa00;
|
/* 可以设置圆点的颜色,这里是红色 */
|
// margin-right: 5px; /* 可以设置圆点与文字之间的距离 */
|
/* 如果需要更大的圆点,可以使用下面的属性 */
|
font-size: 20px;
|
/* 设置圆点的大小 */
|
}
|
|
.page-wrap {
|
height: 100%;
|
padding-top: 45px;
|
padding-left: 30rpx;
|
padding-right: 30rpx;
|
|
.test-view {
|
height: 300rpx;
|
}
|
|
.navbar-content {
|
width: 100%;
|
display: flex;
|
padding: 30rpx;
|
align-items: center;
|
justify-content: space-between;
|
}
|
|
.u-icon {
|
margin-left: 30rpx;
|
}
|
|
.item-wrap {
|
display: flex;
|
margin: 10rpx;
|
padding: 30rpx;
|
align-items: center;
|
border-radius: 16rpx;
|
box-shadow: 0rpx 8rpx 16rpx rgba(0, 0, 0, 0.11);
|
|
.avatar {
|
width: 150rpx;
|
height: 150rpx;
|
margin-right: 30rpx;
|
border-radius: 16rpx;
|
background-color: #c0c0c0;
|
}
|
|
.item {
|
// width: 100rpx;
|
height: 30rpx;
|
margin-bottom: 10rpx;
|
border-radius: 16rpx;
|
background-color: #c8c7cc;
|
}
|
|
}
|
}
|
</style>
|