张雄 3 years ago
parent 1985d5c491
commit e356554695

@ -10,6 +10,7 @@
<a-config-provider :locale="locale">
<div id="app">
<router-view v-if="isRouterAlive"></router-view>
<alarmModal></alarmModal>
</div>
</a-config-provider>
</template>

@ -0,0 +1,126 @@
<template>
<a-modal :visible="visible" title="警报">
<div class="warning-area">
<a-descriptions :column="1">
<a-descriptions-item label="报警类型">{{alarmData.type}}</a-descriptions-item>
<a-descriptions-item label="报警号">{{alarmData.alarmNo}}</a-descriptions-item>
<a-descriptions-item label="报警人手机号">{{alarmData.deviceNo}}</a-descriptions-item>
<a-descriptions-item label="报警人名称">{{alarmData.deviceName}}</a-descriptions-item>
<a-descriptions-item label="报警时间">{{alarmData.time}}</a-descriptions-item>
<a-descriptions-item label="报警内容">{{alarmData.alarmContent}}</a-descriptions-item>
</a-descriptions>
</div>
<a-checkbox v-model="alarmCheck" @change="checkChange"></a-checkbox>
<template slot="footer">
<a-button type="danger" @click="confirm" :disabled="confirmDisabled">确定</a-button>
</template>
</a-modal>
</template>
<script>
import store from "@/store";
export default {
data() {
return {
//
visible: false,
alarmCheck: false,
confirmDisabled: true,
//
websock: null,
infoText: '',
showInfo: false,
lockReconnect: false,
alarmBox: [],
alarmBG: ['', 'bgCC6966', 'bg969696', 'bgCC6966 ', 'bg969696', 'bgCC6966', 'bgCC6966', 'bgCC6966'],
alarmTime: 0,
timer: null, //
myAudio: null, //
alarmType: ['', '超限报警', '超限预警', '断电报警 ', '离线报警', '设备异常', '上线通知', '来电通知'],
time1: null, //
//
alarmData: {
model: '',
communityCode: '',
alarmType: undefined,
alarmNo: '',
deviceNo: '',
deviceName: '',
time: '',
alarmContent: ''
}
}
},
mounted() {
this.initWebSocket()
},
methods: {
//
initWebSocket: function() {
let communityCode = store.getters.getCommunityCode;
let nickName = store.getters.getUserInfo.userName;
let url = 'wss://saas.kaidalai.cn/websocket/manage/'+ communityCode +'/'+ nickName;
this.websock = new WebSocket(url)
this.websock.onopen = this.websocketOnopen
this.websock.onerror = this.websocketOnerror
this.websock.onmessage = this.websocketOnmessage
this.websock.onclose = this.websocketOnclose
},
websocketOnopen: function () {
console.log('页面WebSocket连接成功')
//
// this.heartCheck.reset().start()
},
//
websocketOnerror: function (e) {
console.log('WebSocket连接发生错误', e)
this.reconnect()
},
//
websocketOnmessage: function (e) {
// console.log('----------');
// console.log(e.data)
let data = JSON.stringify(e.data);
this.alarmData = JSON.parse(data);
if(this.alarmData.alarmType) {
this.visible = true;
}
},
websocketOnclose: function (e) {
// console.log('connection closed (' + e.code + ')')
// this.reconnect()
},
//
reconnect() {
let context = this
if (context.lockReconnect) return
context.lockReconnect = true
//
clearTimeout(this.time1);
this.time1 = setTimeout(function () {
// console.info('...')
context.initWebSocket()
context.lockReconnect = false
}, 5000)
},
/////////
//
checkChange() {
if(this.alarmCheck == true) {
this.confirmDisabled = false;
} else {
this.confirmDisabled = true;
}
},
confirm() {
this.visible = false
}
}
}
</script>
<style lang="less">
</style>

@ -3,7 +3,6 @@ import App from './App.vue'
import './styles/index.less';
import mixins from "@/mixins"
import Antd from 'ant-design-vue';
import echarts from "echarts";
// import {Cascader} from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// import moment from 'moment';
@ -20,18 +19,19 @@ import router from "@/permission";
// Vue.prototype.$moment = moment
const communityCode = store.getters.getCommunityCode;
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage'
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false
import commonTable from './components/table'
import commonUpload from './components/upload/index.vue'
import allCity from './components/allCity/index.vue'
import searchForm from './components/searchForm/index.vue'
import alarmModal from './components/alarmModal/index.vue'
// 注册组件
Vue.component('commonTable', commonTable)
Vue.component('commonUpload', commonUpload)
Vue.component('allCity', allCity)
Vue.component('searchForm', searchForm)
Vue.component('alarmModal', alarmModal)
new Vue({
render: h => h(App),

@ -48,7 +48,7 @@
</a-form-model-item>
</a-col>
<!-- -->
<div v-if="form.identity == 2 || form.identity == 3">
<!-- <div v-if="form.identity == 2 || form.identity == 3">
<a-col :span="12">
<a-form-model-item label="业主姓名" prop="ownerName">
<a-input placeholder="请输入姓名" v-model="form.ownerName" style="width: 90%" />
@ -59,8 +59,8 @@
<a-input placeholder="请输入电话" v-model="form.ownerTel" style="width: 90%" />
</a-form-model-item>
</a-col>
</div>
<div v-if="form.identity == 4">
</div> -->
<!-- <div v-if="form.identity == 4">
<a-col :span="12">
<a-form-model-item label="租户姓名" prop="tenantName">
<a-input placeholder="请输入姓名" v-model="form.tenantName" style="width: 90%" />
@ -71,7 +71,7 @@
<a-input placeholder="请输入电话" v-model="form.tenantTel" style="width: 90%" />
</a-form-model-item>
</a-col>
</div>
</div> -->
<!-- -->
<a-col :span="12">
<a-form-model-item label="姓名" prop="name">

@ -13,38 +13,46 @@
<!-- 登录 -->
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName" @change="tabsSwitch">
<!-- <a-tab-pane key="1" tab="密码登录">
</a-tab-pane> -->
<!-- <a-tab-pane key="1" tab="密码登录"></a-tab-pane> -->
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
</a-tabs>
<div class="login-input" v-if="activeName === '1'">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row> -->
<div style="margin-top:18px"></div>
<span class="form">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row> -->
</span>
<a-button
type="primary"
@click="login"
style="width: 90%; margin: 30px"
style="
width: 90%;
margin-left: 30px;
margin-top: 20px;
height:38px;
margin-bottom: 10px;
"
>
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="22">
<a-col :span="24">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
<a href="/#/rule" target="tar">用户协议</a>
<a href="/#/yszc" target="tar">隐私政策</a>
</a-col>
<a-col :span="2">
<!-- <span class="logintext" @click="status = 3">忘记密码</span
<a-col :span="24" style="margin-top:16px">
<span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
> -->
>
</a-col>
</a-row>
</div>

@ -91,6 +91,9 @@
<img v-for="(item,index) in adviceInfo.imgUrl"
:key="index" :src="$ImgUrl(item.url)" style="height: 90px;width: 160px" />
</a-descriptions-item>
<a-descriptions-item label="内容">
{{adviceInfo.content}}
</a-descriptions-item>
<a-descriptions-item label="反馈内容">
<a-table :columns="replyColumns" :data-source="adviceInfo.voUserAdviceDetailList" :pagination="false">
<template slot="create" slot-scope="text,row">

@ -24,21 +24,6 @@
<a-input v-model="form.title" style="margin: 20px;width: 980px" placeholder="问卷标题(限40字)"></a-input>
<a-textarea v-model="form.description" style="margin: 0px 20px 20px 20px;width: 980px;height:88px" placeholder="问卷说明"></a-textarea>
</div>
<div class="question-area-top" style="margin-top: 20px" v-for="(item,index) in form.questionnaireInsertTopicDTOList" :key="index">
<div class="question-list">
<h4>{{index+1}}.{{item.topic}}</h4><a-tag>{{item.type==1?'单选题':item.type==2?'多选题':item.type==3?'下拉单选':item.type==4?'判断题':'开放题'}}</a-tag>
</div>
<div style="margin-left: 40px" v-if="item.type==1 || item.type==3">
<a-radio disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-radio>
</div>
<div style="margin-left: 40px" v-if="item.type==2">
<a-checkbox disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-checkbox>
</div>
<div style="padding: 20px">
<a-button type="primary" style="margin-left: 20px" @click="editQuestionItem(item,index)"></a-button>
<a-button style="margin-left: 20px" @click="deleteQuestionItem(index)"></a-button>
</div>
</div>
<div class="question-item">
<div style="padding: 20px;display: flex">
<div style="width: 80%" v-if="questionCard.type == 1 || questionCard.type == 2 || questionCard.type == 3">
@ -88,6 +73,21 @@
</div>
</div>
</div>
<div class="question-area-top" style="margin-top: 20px" v-for="(item,index) in form.questionnaireInsertTopicDTOList" :key="index">
<div class="question-list">
<h4>{{index+1}}.{{item.topic}}</h4><a-tag>{{item.type==1?'单选题':item.type==2?'多选题':item.type==3?'下拉单选':item.type==4?'判断题':'开放题'}}</a-tag>
</div>
<div style="margin-left: 40px" v-if="item.type==1 || item.type==3">
<a-radio disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-radio>
</div>
<div style="margin-left: 40px" v-if="item.type==2">
<a-checkbox disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-checkbox>
</div>
<div style="padding: 20px">
<a-button type="primary" style="margin-left: 20px" @click="editQuestionItem(item,index)"></a-button>
<a-button style="margin-left: 20px" @click="deleteQuestionItem(index)"></a-button>
</div>
</div>
</div>
<div class="question-setting">
<div style="padding: 20px">

@ -24,22 +24,6 @@
<a-input v-model="form.title" style="margin: 20px;width: 980px" placeholder="问卷标题(限40字)"></a-input>
<a-textarea v-model="form.description" style="margin: 0px 20px 20px 20px;width: 980px;height:88px" placeholder="问卷说明"></a-textarea>
</div>
<div class="question-area-top" style="margin-top: 20px" v-for="(item,index) in form.questionnaireInsertTopicDTOList" :key="index">
<div class="question-list">
<span style="font-weight: 600">{{index+1}}.{{item.topic}}</span>
<a-tag>{{item.type==1?'单选题':item.type==2?'多选题':item.type==3?'下拉单选':item.type==4?'判断题':'开放题'}}</a-tag>
</div>
<div style="margin-left: 40px" v-if="item.type==1||item.type==3">
<a-radio disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-radio>
</div>
<div style="margin-left: 40px" v-if="item.type==2">
<a-checkbox disabled v-for="(it,id) in item.questionnaireInsertTopicChoiceDTOList" :key="id">{{it.answer}}</a-checkbox>
</div>
<div style="padding: 20px">
<a-button type="primary" style="margin-left: 20px" @click="editQuestionItem(item,index)"></a-button>
<a-button style="margin-left: 20px" @click="deleteQuestionItem(item,index)"></a-button>
</div>
</div>
<div class="question-item">
<div style="padding: 20px;display: flex">
<div style="width: 80%" v-if="questionCard.type == 1 || questionCard.type == 2 || questionCard.type == 3">
@ -87,9 +71,25 @@
</a-form-model-item>
</a-form-model>
</div>
</div>
</div>
<div class="question-area-top" style="margin-top: 20px" v-for="(item,index) in form.questionnaireUpdateTopicDTOList" :key="index">
<div class="question-list">
<span style="font-weight: 600">{{index+1}}.{{item.topic}}</span>
<a-tag>{{item.type==1?'单选题':item.type==2?'多选题':item.type==3?'下拉单选':item.type==4?'判断题':'开放题'}}</a-tag>
</div>
<div style="margin-left: 40px" v-if="item.type==1||item.type==3">
<a-radio disabled v-for="(it,id) in item.questionnaireUpdateTopicChoiceDTOList" :key="id">{{it.answer}}</a-radio>
</div>
<div style="margin-left: 40px" v-if="item.type==2">
<a-checkbox disabled v-for="(it,id) in item.questionnaireUpdateTopicChoiceDTOList" :key="id">{{it.answer}}</a-checkbox>
</div>
<div style="padding: 20px">
<a-button type="primary" style="margin-left: 20px" @click="editQuestionItem(item,index)"></a-button>
<a-button style="margin-left: 20px" @click="deleteQuestionItem(item,index)"></a-button>
</div>
</div>
</div>
<div class="question-setting">
<div style="padding: 20px">
@ -141,7 +141,7 @@ export default {
answerType: undefined,
beginDate: '',
endDate: '',
questionnaireInsertTopicDTOList: [],
questionnaireUpdateTopicDTOList: [],
isRelease: 0,
imgUrls: [],
deleteTopicIds: [],
@ -173,7 +173,7 @@ export default {
this.form.endDate = data.endDate;
this.form.isRelease = data.isRelease;
this.form.imgUrls = [];
// this.form.questionnaireInsertTopicDTOList = data.questionnaireFBITopicVoList;
// this.form.questionnaireUpdateTopicDTOList = data.questionnaireFBITopicVoList;
if (res.data.imgList.length > 0) {
const pic = [];
this.form.imgUrls.push(res.data.imgList[0].url);
@ -199,11 +199,11 @@ export default {
type: ele.type,
topic: ele.topic,
deleteTopicChoiceIds: [],
questionnaireInsertTopicChoiceDTOList: ele.questionnaireFBITopicChoiceVoList
questionnaireUpdateTopicChoiceDTOList: ele.questionnaireFBITopicChoiceVoList
};
arr.push(obj)
});
this.form.questionnaireInsertTopicDTOList = arr
this.form.questionnaireUpdateTopicDTOList = arr
})
}
},
@ -216,7 +216,7 @@ export default {
type: type,
topic: '',
id: null,
questionnaireInsertTopicChoiceDTOList: [],
questionnaireUpdateTopicChoiceDTOList: [],
deleteTopicChoiceIds:[]
};
this.questionCard = obj
@ -232,19 +232,19 @@ export default {
type: this.questionCard.type,
topic: this.questionCard.topic,
id: null,
questionnaireInsertTopicChoiceDTOList: this.questionChoice,
questionnaireUpdateTopicChoiceDTOList: this.questionChoice,
deleteTopicChoiceIds: [],
};
this.form.questionnaireInsertTopicDTOList.push(obj)
this.form.questionnaireUpdateTopicDTOList.push(obj)
} else {
let obj = {
type: this.questionCard.type,
topic: this.questionCard.topic,
id: null,
questionnaireInsertTopicChoiceDTOList: [],
questionnaireUpdateTopicChoiceDTOList: [],
deleteTopicChoiceIds: []
};
this.form.questionnaireInsertTopicDTOList.push(obj)
this.form.questionnaireUpdateTopicDTOList.push(obj)
}
} else if (this.isEdit == true) {
if(type == 1 || type == 2 || type == 3) {
@ -255,19 +255,19 @@ export default {
type: this.questionCard.type,
topic: this.questionCard.topic,
id: this.questionCard.id,
questionnaireInsertTopicChoiceDTOList: this.questionChoice,
questionnaireUpdateTopicChoiceDTOList: this.questionChoice,
deleteTopicChoiceIds: deleteId
};
this.form.questionnaireInsertTopicDTOList[this.activeIndex] = obj
this.form.questionnaireUpdateTopicDTOList[this.activeIndex] = obj
} else {
let obj = {
type: this.questionCard.type,
topic: this.questionCard.topic,
id: this.questionCard.id,
questionnaireInsertTopicChoiceDTOList: [],
questionnaireUpdateTopicChoiceDTOList: [],
deleteTopicChoiceIds: []
};
this.form.questionnaireInsertTopicDTOList[this.activeIndex] = obj
this.form.questionnaireUpdateTopicDTOList[this.activeIndex] = obj
}
}
this.questionCancel()
@ -304,14 +304,14 @@ export default {
this.questionCard.type = item.type;
this.questionCard.topic = item.topic;
this.questionCard.id = item.id;
if(item.questionnaireInsertTopicChoiceDTOList) {
this.questionChoice = item.questionnaireInsertTopicChoiceDTOList
if(item.questionnaireUpdateTopicChoiceDTOList) {
this.questionChoice = item.questionnaireUpdateTopicChoiceDTOList
}
},
//
deleteQuestionItem(item,index) {
this.form.deleteTopicIds.push(item.id)
this.form.questionnaireInsertTopicDTOList.splice(index,1)
this.form.questionnaireUpdateTopicDTOList.splice(index,1)
},
//
save() {

@ -24,6 +24,14 @@
}
"
>
<span slot="content" slot-scope="text, record">
<a-popover>
<template slot="content">
<div style="width: 600px">{{record.content}}</div>
</template>
<div>{{doStr(record.content,21)}}</div>
</a-popover>
</span>
</a-table>
</div>
</a-modal>
@ -53,6 +61,30 @@ export default {
};
},
methods: {
getData() {
let obj = {pageNum: this.pagination.current, size: this.pagination.pageSize}
if(this.typeMean == 'shop') {
shopPushList(obj).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
});
} else if (this.typeMean == 'news') {
newsList(obj).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
});
} else if (this.typeMean == 'announcement') {
announcementList(obj).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
});
} else if (this.typeMean == 'activity') {
activityList(obj).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
});
}
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
@ -91,6 +123,14 @@ export default {
this.selectedRowKeys = []
}
},
//
doStr(str, number) {
if(str.length >= number) {
return str.substr(0,number-1) + '...'
} else {
return str
}
}
},
watch: {
type: {

@ -158,6 +158,7 @@ export const columns = {
title: "内容",
dataIndex: "content",
width: "13%",
scopedSlots: { customRender: "content"}
},
{
title: "阅读量",

@ -39,7 +39,7 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="扣费时间">
<a-form-model-item label="生成时间">
<a-select v-model="form.billDateStart">
<a-select-option :value="1">每月第一天</a-select-option>
<a-select-option :value="2">每月最后一天</a-select-option>

Binary file not shown.
Loading…
Cancel
Save