Compare commits

..

No commits in common. 'd0cbc441f039ebe94dab7e81d37e1f121703c971' and 'ad46e424dc501dfa292e4bd792251895231d3c7a' have entirely different histories.

@ -1,3 +1,3 @@
NODE_ENV = 'development'
VUE_APP_URL = 'http://127.0.0.1:8004/'
VUE_APP_STATIC = 'http://127.0.0.1:8004/resource/'
VUE_APP_URL = 'http://121.41.26.225:8004/'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

@ -1,3 +1,3 @@
NODE_ENV = 'production'
VUE_APP_URL = 'http://127.0.0.1:8004/api/'
VUE_APP_STATIC = 'http://127.0.0.1:8004/resource/'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

74
package-lock.json generated

@ -11,7 +11,6 @@
"ant-design-vue": "^1.7.8",
"axios": "^0.24.0",
"core-js": "^3.6.5",
"echarts": "^5.3.2",
"less": "^4.1.2",
"less-loader": "5.0.0",
"momen": "^0.0.1-security",
@ -19,7 +18,6 @@
"qrcodejs2": "^0.0.2",
"vue": "^2.6.11",
"vue-router": "^3.5.3",
"vuescroll": "^4.17.3",
"vuex": "^3.6.2"
},
"devDependencies": {
@ -5856,20 +5854,6 @@
"safer-buffer": "^2.1.0"
}
},
"node_modules/echarts": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz",
"integrity": "sha512-LWCt7ohOKdJqyiBJ0OGBmE9szLdfA9sGcsMEi+GGoc6+Xo75C+BkcT/6NNGRHAWtnQl2fNow05AQjznpap28TQ==",
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.3.1"
}
},
"node_modules/echarts/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@ -13609,14 +13593,6 @@
"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
"dev": true
},
"node_modules/vuescroll": {
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/vuescroll/-/vuescroll-4.17.3.tgz",
"integrity": "sha512-5P3hje/fYjo1eAB0Y8zboLbaq/mnPNczYyZ1aPHHM6wIFKcqal9Mi42CBCZizUnEtoXtbsGlnyLcVbnalTNptA==",
"peerDependencies": {
"vue": "^2.0.0"
}
},
"node_modules/vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
@ -14359,19 +14335,6 @@
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/zrender": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.1.tgz",
"integrity": "sha512-7olqIjy0gWfznKr6vgfnGBk7y4UtdMvdwFmK92vVQsQeDPyzkHW1OlrLEKg6GHz1W5ePf0FeN1q2vkl/HFqhXw==",
"dependencies": {
"tslib": "2.3.0"
}
},
"node_modules/zrender/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
},
"dependencies": {
@ -18971,22 +18934,6 @@
"safer-buffer": "^2.1.0"
}
},
"echarts": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz",
"integrity": "sha512-LWCt7ohOKdJqyiBJ0OGBmE9szLdfA9sGcsMEi+GGoc6+Xo75C+BkcT/6NNGRHAWtnQl2fNow05AQjznpap28TQ==",
"requires": {
"tslib": "2.3.0",
"zrender": "5.3.1"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@ -25205,12 +25152,6 @@
"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
"dev": true
},
"vuescroll": {
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/vuescroll/-/vuescroll-4.17.3.tgz",
"integrity": "sha512-5P3hje/fYjo1eAB0Y8zboLbaq/mnPNczYyZ1aPHHM6wIFKcqal9Mi42CBCZizUnEtoXtbsGlnyLcVbnalTNptA==",
"requires": {}
},
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
@ -25799,21 +25740,6 @@
"dev": true
}
}
},
"zrender": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.1.tgz",
"integrity": "sha512-7olqIjy0gWfznKr6vgfnGBk7y4UtdMvdwFmK92vVQsQeDPyzkHW1OlrLEKg6GHz1W5ePf0FeN1q2vkl/HFqhXw==",
"requires": {
"tslib": "2.3.0"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
}
}
}

@ -10,15 +10,12 @@
"ant-design-vue": "^1.7.8",
"axios": "^0.24.0",
"core-js": "^3.6.5",
"echarts": "^5.3.2",
"element-ui": "^2.15.12",
"less": "^4.1.2",
"less-loader": "5.0.0",
"momen": "^0.0.1-security",
"nprogress": "^0.2.0",
"qrcodejs2": "^0.0.2",
"vue": "^2.6.11",
"vue-json-excel": "^0.3.0",
"vue-router": "^3.5.3",
"vuescroll": "^4.17.3",
"vuex": "^3.6.2"

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

@ -1,10 +0,0 @@
import httpService from "@/request";
// 获取table表格
export function GetTableData(params) {
return httpService({
url: `/user/protectionRegistration/list`,
method: 'get',
params: params,
})
}

@ -1,46 +0,0 @@
import httpService from "@/request"
// 查询所有的违禁关键字
export function getForbiddenList(params) {
return httpService({
url: `/user/prohibitedKeywords/list`,
method: 'get',
params: params,
})
}
// 添加违禁字
export function addForbidden(params) {
return httpService({
url: `/user/prohibitedKeywords/insert`,
method: 'post',
data: params,
})
}
// 删除违禁字
export function deleteForbidden(params) {
return httpService({
url: `/user/prohibitedKeywords/delete`,
method: 'post',
data: params,
})
}
// 根据id查询违禁字
export function findForbidden(params) {
return httpService({
url: `/user/prohibitedKeywords/findById`,
method: 'get',
params: params,
})
}
// 修改违禁字
export function updateForbidden(params) {
return httpService({
url: `/user/prohibitedKeywords/update`,
method: 'post',
data: params,
})
}

@ -62,14 +62,6 @@ export function findTenantByEstateId(params) {
params: params,
})
}
// 根据房屋查业主
export function findOwnerByEstateId(params) {
return httpService({
url: `/user/resident/findOwnerByEstateId`,
method: 'get',
params: params,
})
}
// 住户详情
export function residentDetail(params) {
return httpService({

@ -1,84 +0,0 @@
import httpService from "@/request"
///类型
// 查询所有业委会类型信息
export function getComList(params) {
return httpService({
url: `/user/industryCommitteeType/list`,
method: 'get',
params: params,
})
}
// 添加业委会类型
export function addComType(params) {
return httpService({
url: `/user/industryCommitteeType/insert`,
method: 'post',
data: params,
})
}
// 修改业委会类型
export function updateComType(params) {
return httpService({
url: `/user/industryCommitteeType/update`,
method: 'post',
data: params,
})
}
// 删除业委会类型
export function delComType(params) {
return httpService({
url: `/user/industryCommitteeType/delete`,
method: 'get',
params: params,
})
}
///信息
// 查询所有业委会信息
export function getIndustryCommitteeList(params) {
return httpService({
url: `/user/industryCommittee/list`,
method: 'get',
params: params,
})
}
// 添加业委会信息
export function addIndustryCom(params) {
return httpService({
url: `/user/industryCommittee/insert`,
method: 'post',
data: params,
})
}
// 删除业委会信息
export function delIndustryCom(params) {
return httpService({
url: `/user/industryCommittee/delete`,
method: 'post',
data: params,
})
}
// 根据业委会主键id查询业委会信息
export function findIndustryCom(params) {
return httpService({
url: `/user/industryCommittee/findById`,
method: 'get',
params: params,
})
}
// 修改业委会信息
export function updateIndustryCom(params) {
return httpService({
url: `/user/industryCommittee/update`,
method: 'post',
data: params,
})
}

@ -1,77 +0,0 @@
import httpService from "@/request"
//分类
// 查询所有的分类
export function getRegistersList(params) {
return httpService({
url: `/user/protectionRegistration/list`,
method: 'get',
params: params,
})
}
export function add(params) {
return httpService({
url: `/user/protectionRegistration/add`,
method: 'post',
data: params,
})
}
export function protectionRegistrationDelete(params) {
return httpService({
url: `/user/protectionRegistration/delete`,
method: 'post',
data: params,
})
}
export function registerExport(params) {
return httpService({
url: `/user/protectionRegistration/export`,
method: 'post',
data: params,
})
}
export function getReturnRegistersList(params) {
return httpService({
url: `/user/returnRegistration/list`,
method: 'get',
params: params,
})
}
export function getClockOnList(params) {
return httpService({
url: `/user/epidemicClockOn/list`,
method: 'get',
params: params,
})
}
export function epidemicClockOnDelete(params) {
return httpService({
url: `/user/epidemicClockOn/delete`,
method: 'post',
data: params,
})
}
export function returnRegistrationDelete(params) {
return httpService({
url: `/user/returnRegistration/delete`,
method: 'post',
data: params,
})
}

@ -1,112 +0,0 @@
import httpService from "@/request"
//分类
// 查询所有的设施/设备分类
export function getFacilitiesList(params) {
return httpService({
url: `/user/facilitiesCategory/list`,
method: 'get',
params: params,
})
}
// 添加设施/设备分类信息
export function addFacility(params) {
return httpService({
url: `/user/facilitiesCategory/insert`,
method: 'post',
data: params,
})
}
// 批量删除设施/设备分类
export function delFacility(params) {
return httpService({
url: `/user/facilitiesCategory/delete`,
method: 'post',
data: params,
})
}
// 根据设施/设备分类主键id查询设施/设备分类信息
export function findFacility(params) {
return httpService({
url: `/user/facilitiesCategory/findById`,
method: 'get',
params: params,
})
}
// 修改设施分类信息(不允许修改设施分类类型)
export function updateFacility(params) {
return httpService({
url: `/user/facilitiesCategory/update`,
method: 'post',
data: params,
})
}
//管理
// 查询所有的设施/设备管理
export function facilityInfoList(params) {
return httpService({
url: `/user/facilitiesManage/list`,
method: 'get',
params: params,
})
}
// 添加设施/设备信息
export function addFacilityInfo(params) {
return httpService({
url: `/user/facilitiesManage/insert`,
method: 'post',
data: params,
})
}
// 根据设施/设备主键id查询设施/设备信息
export function findFacilityInfo(params) {
return httpService({
url: `/user/facilitiesManage/findById`,
method: 'get',
params: params,
})
}
// 根据设施/设备主键id查询设施/设备情况list记录
export function findRecordList(params) {
return httpService({
url: `/user/facilitiesManage/situationList`,
method: 'get',
params: params,
})
}
// 修改设施/设备信息
export function updateFacilityInfo(params) {
return httpService({
url: `/user/facilitiesManage/update`,
method: 'post',
data: params,
})
}
// 批量删除设施/设备信息
export function delFacilityInfo(params) {
return httpService({
url: `/user/facilitiesManage/delete`,
method: 'post',
data: params,
})
}
//预约
//查询所有的设施设备预约
export function getFacilitiesReserve(params) {
return httpService({
url: `/user/facilitiesReserve/list`,
method: 'get',
params: params,
})
}

@ -1,73 +0,0 @@
import httpService from "@/request"
// 查询所有问卷调查信息
export function getQuestionList(params) {
return httpService({
url: `/user/questionnaire/list`,
method: 'get',
params: params,
})
}
// 添加问卷调查表信息
export function addQuestion(params) {
return httpService({
url: `/user/questionnaire/insert`,
method: 'post',
data: params,
})
}
// 更新问卷调查表信息
export function updateQuestion(params) {
return httpService({
url: `/user/questionnaire/update`,
method: 'post',
data: params,
})
}
// 删除问卷调查信息
export function delQuestion(params) {
return httpService({
url: `/user/questionnaire/delete`,
method: 'post',
data: params,
})
}
// 发布下架问卷调查
export function releaseQuestion(params) {
return httpService({
url: `/user/questionnaire/isRelease`,
method: 'get',
params: params,
})
}
// 根据问卷调查主键ID查询问卷调查信息
export function findQuestion(params) {
return httpService({
url: `/user/questionnaire/findById`,
method: 'get',
params: params,
})
}
// 根据问卷调查主键id查询报表分析信息
export function getReport(params) {
return httpService({
url: `/user/questionnaire/reportAnalysis`,
method: 'get',
params: params,
})
}
// 根据题目主键id查询开放题内容信息列表
export function getAnswerList(params) {
return httpService({
url: `/user/questionnaire/shortAnswerList`,
method: 'get',
params: params,
})
}

@ -62,39 +62,3 @@ export function delPhone(params) {
data: params,
})
}
// 查询所有的便民电话类型
export function getPhontTypeList(params) {
return httpService({
url: `/user/conveniencePhoneType/list`,
method: 'get',
params: params,
})
}
// 添加便民电话类型
export function addPhontType(params) {
return httpService({
url: `/user/conveniencePhoneType/insert`,
method: 'post',
data: params,
})
}
// 修改便民电话类型
export function updatePhontType(params) {
return httpService({
url: `/user/conveniencePhoneType/update`,
method: 'post',
data: params,
})
}
// 删除便民电话类型
export function delPhontType(params) {
return httpService({
url: `/user/conveniencePhoneType/delete`,
method: 'get',
params: params,
})
}

@ -1,82 +0,0 @@
import httpService from "@/request"
// 查询所有投票信息
export function getVoteList(params) {
return httpService({
url: `/user/vote/list`,
method: 'get',
params: params,
})
}
// 添加投票信息
export function addVote(params) {
return httpService({
url: `/user/vote/insert`,
method: 'post',
data: params,
})
}
// 删除投票信息
export function deleteVote(params) {
return httpService({
url: `/user/vote/delete`,
method: 'post',
data: params,
})
}
// 根据投票主键id查询投票信息
export function findVote(params) {
return httpService({
url: `/user/vote/findById`,
method: 'get',
params: params,
})
}
// 修改投票信息
export function updateVote(params) {
return httpService({
url: `/user/vote/update`,
method: 'post',
data: params,
})
}
// 发布下架投票
export function releaseVote(params) {
return httpService({
url: `/user/vote/isRelease`,
method: 'get',
params: params,
})
}
// 查询候选项信息(详情页面)
export function getCandidateList(params) {
return httpService({
url: `/user/vote/findCandidateList`,
method: 'get',
params: params,
})
}
// 查询候选人被投票信息(详情页面)
export function getPersonalList(params) {
return httpService({
url: `/user/vote/findPersonnelList`,
method: 'get',
params: params,
})
}
// 即将开始的投票个数
export function getTodayVote(params) {
return httpService({
url: `/user/vote/countVoteExpectedStart`,
method: 'get',
params: params,
})
}

@ -16,14 +16,6 @@ export function loginTel(params) {
data: params,
})
}
// 密码登录
export function loginPWD(params) {
return httpService({
url: `/loginPWD`,
method: 'post',
data: params,
})
}
// 退出登录
export function quit(params) {
return httpService({

@ -1,9 +0,0 @@
const requestUrl = {
// 综合服务
userProtectionRegistrationList:'user/protectionRegistration/list',
userReturnRegistrationList:'user/registration/list',
userEpidemicClockOnList:'user/epidemicClockOn/list'
}
export default requestUrl

@ -91,76 +91,3 @@ export function brandSelect(params) {
params: params,
})
}
//开启/关闭积分兑换
export function isEnableRedeem(params) {
return httpService({
url: `/user/pointsGoods/isEnableRedeem`,
method: 'get',
params: params,
})
}
//查询所有积分商品
export function getPointList(params) {
return httpService({
url: `/user/pointsGoods/list`,
method: 'get',
params: params,
})
}
//设置积分
export function settingPoints(params) {
return httpService({
url: `/user/pointsGoods/settingPoints`,
method: 'post',
data: params,
})
}
//自营
//自营商品列表
export function selfGoodsList(params) {
return httpService({
url: `/user/shop/selfGoodsList`,
method: 'get',
params: params,
})
}
//自营商品推送
export function selfGoodsPush(params) {
return httpService({
url: `/user/shop/selfGoodsPush`,
method: 'post',
data: params,
})
}
//自营商品批量推送
export function selfGoodsMultiPush(params) {
return httpService({
url: `/user/shop/selfGoodsBatchPush`,
method: 'post',
data: params,
})
}
//自营商品-查询所有商品类型(级联)
export function findAllGoodsCategory(params) {
return httpService({
url: `/user/shopCategory/findAllGoodsCategory`,
method: 'get',
params: params,
})
}
//自营商品-自营商品推送
export function selfItemPush(params) {
return httpService({
url: `/user/shop/selfGoodsPush`,
method: 'post',
data: params,
})
}

@ -1,126 +0,0 @@
<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 userId = store.getters.getUserInfo.id;
let url = 'wss://saas.kaidalai.cn/websocket/manage/'+ communityCode +'/'+ nickName + '/' + userId;
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>

@ -25,7 +25,7 @@
</a-form-model-item>
</a-form-model>
<div class="btn-box"><a-button type="primary" @click="getSearch"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button></div>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button></div>
</div>
</template>

@ -15,7 +15,6 @@ Vue.use(mixins);
// Vue.use(Cascader);
import store from "@/store";
import router from "@/permission";
import JsonExcel from 'vue-json-excel'
// Vue.prototype.$moment = moment
const communityCode = store.getters.getCommunityCode;
@ -25,15 +24,12 @@ 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)
Vue.component('downloadExcel', JsonExcel)
new Vue({
render: h => h(App),

@ -3,7 +3,7 @@ import "nprogress/nprogress.css"
import router from "@/router"
import store from '@/store'
const whitePath = [ '/login','/rule','/yszc','/fromPlatform']
const whitePath = [ '/login','/rule','/yszc']
// 判断登录
router.beforeEach((to, from, next) => {
NProgress.start()

@ -1,28 +0,0 @@
import { GetTableData } from '@/api/basic'
import {getRegistersList} from "@/api/operation/epidemic"
export async function DownloadExcel(params, that) {
let Excel = []
console.log(params)
console.log("1")
params = params.data;
const response = await GetTableData(params)
Excel.push(...response.data.rows)
if (response.pageCount > 1) {
for (let i = 1; i < response.pageCount; i++) {
params.pageNum = i + 1;
const data1 =getRegistersList(params)
const data = await GetTableData(params)
that.ExcelLoading(i, response.pageCount)
Excel.push(...data.data.rows)
}
}
return Excel
}
export async function partDownloadExcel(params) {
let Excel = []
const response = await GetTableData(params)
console.log(response);
Excel.push(...response.tableList)
return Excel
}

@ -91,15 +91,6 @@ export default [
component: resolve => require(['@/views/Basic/WorkOrder'], resolve),
meta: {title: '工单管理'}
},
{
path: '/Forbidden',
name: "Forbidden",
title: "违禁字管理",
icon: 'stop',
hide: false,
component: resolve => require(['@/views/Basic/Forbidden'], resolve),
meta: {title: '违禁字管理'}
},
// {
// path: '/attendance',
// name: "Attendance",

@ -97,22 +97,11 @@ const router = [
title: "隐私政策",
component: resolve => require(['@/views/Yszc'], resolve)
},
{
path: "/fromPlatform",
name: "fromPlatform",
title: "跳转登录",
component: resolve => require(['@/views/FromPlatform'], resolve)
},
{
path: "/login",
name: "Login",
title: "登录",
component: resolve => require(['@/views/Login'], resolve)
},
{
path:'/videoFusion',
name:'videoFusion',
component: resolve => require(['@/views/Operation/Epidemic/videoFusion.vue'], resolve),
}
]

@ -216,128 +216,4 @@ export default [
component: resolve => require(['@/views/Operation/CommunityIntro'], resolve),
meta: {title: '社区介绍'},
},
{
path: '/Epidemic',
name: "Epidemic",
title: "新冠疫情防控",
icon: 'solution',
hide: false,
component: resolve => require(['@/views/Operation/Epidemic'], resolve),
redirect: '/Facility/FacilityType',
meta: {title: '设施设备'},
children: [
{
path: '/Epidemic/EpidemicRegister',
name: "EpidemicRegister",
title: "新冠防护登记",
hide: false,
component: resolve => require(['@/views/Operation/Epidemic/_epidemicRegister'], resolve),
meta: {title: '设施设备分类'},
},
{
path: '/Epidemic/EpidemicClockOn',
name: "EpidemicClockOn",
title: "新冠健康打卡",
hide: false,
component: resolve => require(['@/views/Operation/Epidemic/_epidemicClockOn'], resolve),
meta: {title: '设施设备管理'},
},
{
path: '/Epidemic/EpidemicReturnRegister',
name: "FacilityPreOrder",
title: "新冠返程登记",
hide: false,
component: resolve => require(['@/views/Operation/Epidemic/_epidemicReturnRegister'], resolve),
meta: {title: '预约管理'},
},
]
},
{
path: '/Facility',
name: "Facility",
title: "设施设备",
icon: 'solution',
hide: false,
component: resolve => require(['@/views/Operation/Facility'], resolve),
redirect: '/Facility/FacilityType',
meta: {title: '设施设备'},
children: [
{
path: '/Facility/FacilityType',
name: "FacilityType",
title: "设施设备分类",
hide: false,
component: resolve => require(['@/views/Operation/Facility/_facilityType'], resolve),
meta: {title: '设施设备分类'},
},
{
path: '/Facility/FacilityInfo',
name: "FacilityInfo",
title: "设施设备管理",
hide: false,
component: resolve => require(['@/views/Operation/Facility/_facilityInfo'], resolve),
meta: {title: '设施设备管理'},
},
{
path: '/Facility/FacilityPreOrder',
name: "FacilityPreOrder",
title: "预约管理",
hide: false,
component: resolve => require(['@/views/Operation/Facility/_facilityPreOrder'], resolve),
meta: {title: '预约管理'},
}
]
},
{
path: '/Commission',
name: "Commission",
title: "业委会",
icon: 'cluster',
hide: false,
component: resolve => require(['@/views/Operation/Commission'], resolve),
meta: {title: '业委会'},
},
{
path: '/Scroll',
name: "Scroll",
title: "问卷调查",
icon: 'container',
hide: false,
component: resolve => require(['@/views/Operation/Scroll'], resolve),
meta: {title: '问卷调查'},
},
{
path: '/Scroll/addScroll',
name: "addScroll",
title: "新增问卷调查",
hide: true,
component: resolve => require(['@/views/Operation/Scroll/addScroll'], resolve),
meta: {title: '新增问卷调查'},
},
{
path: '/Scroll/editScroll',
name: "editScroll",
title: "编辑问卷调查",
hide: true,
component: resolve => require(['@/views/Operation/Scroll/editScroll'], resolve),
meta: {title: '编辑问卷调查'},
},
{
path: '/Scroll/analyze',
name: "analyze",
title: "问卷调查报表分析",
hide: true,
component: resolve => require(['@/views/Operation/Scroll/analyze'], resolve),
meta: {title: '问卷调查报表分析'},
},
{
path: '/Vote',
name: "Vote",
title: "投票管理",
icon: 'bar-chart',
hide: false,
component: resolve => require(['@/views/Operation/Vote'], resolve),
meta: {title: '投票管理'},
},
]

@ -25,22 +25,6 @@ export default [
component: resolve => require(['@/views/Shop/GoodsManage/_goodsList'], resolve),
meta: {title: '商品列表'},
},
{
path: '/GoodsManage/SelfGoodsList',
name: "SelfGoodsList",
title: "自营商品列表",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_selfGoodsList'], resolve),
meta: {title: '自营商品列表'},
},
{
path: '/GoodsManage/PointGoods',
name: "PointGoods",
title: "兑换商品设置",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_pointGoods'], resolve),
meta: {title: '兑换商品设置'},
},
{
path: '/GoodsManage/JcookList',
name: "JcookList",

@ -1,83 +0,0 @@
import axios from 'axios'
// ElementUI 单独引入
import ElementUI from 'element-ui'
import router from '../router'
import qs from 'qs'
// 创建实例
const service = axios.create({
baseURL: process.env.VUE_APP_API, // 请求地址
withCredentials: false,
timeout: 5000 // 超时
})
// axios
// 添加请求拦截器
service.interceptors.request.use(
function(config) {
// 在发送请求之前做些什么
config.headers['X-Admin-Token'] = sessionStorage.getItem(
'X-Admin-Token'
)
// Access-Control-Allow-Origin: *
return config
},
function(error) {
// 对请求错误做些什么
return Promise.reject(error)
}
)
// 添加响应拦截器
service.interceptors.response.use(
function(response) {
const data = response.data
// 未登录或登录失效
if (data.code == '-1000') {
ElementUI.Message.error(data.message)
setTimeout(() => {
router.replace({
path: '/Login'
})
}, 500)
return response
}else if(data.code =='-1001'){
ElementUI.Message.error(data.message)
return response
}else if(data.code =='400'){
ElementUI.Message.error(data.message)
return response
}else if(data.code =='401'){
ElementUI.Message.error(data.message)
return response
}else if(data.code =='404'){
ElementUI.Message.error(data.message)
return response
}else if(data.code =='500'){
ElementUI.Message.error(data.message)
return response
}else if(data.code =='503'){
ElementUI.Message.error(data.message)
return response
}
if (data.status != true && data.status != null) {
console.log(data);
ElementUI.Message({message:data.message,type:'error'})
return data
} else {
return data // return Promise.resolve(data);
}
return data
},
function(error) {
// 对响应错误做点什么
return Promise.reject(error)
}
)
// 暴露service
export default service

@ -8,15 +8,9 @@ export default {
Vue.prototype.qs = qs
// 上传
Vue.prototype.$upload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/upload/uploadImg'
// 上传员工/房屋/住户/单元/楼栋EXCEL
Vue.prototype.$excelUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importManageUserExcel'
Vue.prototype.$houseUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importEstateExcel'
Vue.prototype.$residentUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importResidentExcel'
Vue.prototype.$unitUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importUnitExcel'
Vue.prototype.$buildingUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importBuildingExcel'
// 静态地址
Vue.prototype.$ImgUrl = (src) => {
return process.env.VUE_APP_URL + store.getters.getCommunityCode + '/' + src
return process.env.VUE_APP_STATIC + store.getters.getCommunityCode + '/' + src
}
// 时间格式化
Vue.prototype.formatDate = (time, fmt) => {

@ -341,6 +341,7 @@ export default {
this.fileList =[]
},
async handlePreview(file) {
console.log(file);
if(file.name.indexOf('pdf')!==-1){
if(file.response){
window.open(this.$ImgUrl(file.response.data))

@ -61,14 +61,6 @@
<a-button class='add-btn' :loading="loading" @click="addStaff()">
新增员工
</a-button>
<a-upload name="file" :action="`${$excelUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button @click="modelDownload">
<a-icon type="copy" />模版下载
</a-button>
<a-button :disabled="!hasSelected" :loading="loading">
批量操作
</a-button>
@ -207,16 +199,9 @@
<a-button type="primary" @click="rePswSubmit"> </a-button>
</div>
</a-drawer>
<a-modal title="批量导入操作成功" :visible="uploadVisible" @cancel="uploadVisible = false" :footer="null">
<div>以下为导入失败的用户</div>
<p v-for="(item,index) in uploadResult" :key="index">
{{item}}
</p>
</a-modal>
</div>
</template>
<script>
import store from "@/store";
import { columns, pagination, searchForm } from "./depend/config.js";
import vueForm from "./depend/form.vue";
import {
@ -288,13 +273,6 @@ export default {
loading: false,
selectedRowKeys: [],
type: "add",
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
//
uploadVisible: false,
uploadResult: [],
};
},
mounted() {
@ -577,28 +555,6 @@ export default {
}
}
},
//
changeFile(data) {
if(data.file.status == "done") {
if(data.file.response.success == false) {
this.$message.error(data.file.response.msg);
} else {
this.$message.success('操作成功');
if(data.file.response.data) {
this.uploadResult = data.file.response.data;
this.uploadVisible = true;
}
this.getData();
}
}
},
beforeUpload() {
},
//
modelDownload() {
window.open('https://saas.kaidalai.cn/excelModel/员工导入模版.xlsx');
}
},
computed: {
hasSelected() {

@ -3,15 +3,10 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: "8%",
},
{
title: "楼栋名称",
dataIndex: "name",
width: "15%",
width: "20%",
customRender:function(name){
return name + '栋'
}
@ -19,17 +14,17 @@ export const columns = [
{
title: "房屋总数",
dataIndex: "estateTotals",
width: "15%",
width: "20%",
},
{
title: "租赁房屋数",
dataIndex: "leaseEstateNums",
width: "15%"
width: "20%"
},
{
title: "租赁率",
dataIndex: "leaseRate",
width: "15%",
width: "20%",
customRender:function(leaseRate){
return ( leaseRate*100 ).toFixed(2)+'%'
}
@ -75,39 +70,20 @@ export const form = {
name: '',
buildingInfoImgUrls:[]
}
const handleConfirm = (rule,value,callback) => {
if(!value){
callback();
}else{
// 正则判断失败抛出错误否则直接callback()
if(/[\u4E00-\u9FA5]/g.test(value)) {
callback(new Error("不能输入中文!"));
}else{
callback();
}
}
}
export const rules = {
name:[{required:true,message:'请输入楼栋',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
name:[{required:true,message:'请输入楼栋',trigger:'blur'}],
}
export const unitColumns = [
{
title: "导入编号",
dataIndex: "id",
width: "15%",
},
{
title: "单元号",
dataIndex: "name",
width: "12%",
width: "15%",
},
{
title: "楼层数",
dataIndex: "floor",
width: "12%",
width: "15%",
},
{
title: "公共楼层数",

@ -74,14 +74,6 @@
单元信息
<a-divider></a-divider>
<a-button class='add-btn' @click='addUnit' style="margin-bottom:5px">新增单元</a-button>
<a-upload name="file" :action="`${$unitUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button>批量导入</a-button>
</a-upload>
<a-button @click="modelDownload">
模版下载
</a-button>
<a-table :columns="unitColumns" :data-source="unitData" :row-key="record => record.id">
<span slot="action" slot-scope="text, row">
<a-space><a @click="addUnit(text, row)">编辑</a>
@ -136,7 +128,6 @@
</template>
<script>
import store from "@/store";
import { form, rules, unitColumns,uploadHeaders } from "./config";
import { buildInsert,buildUpdate, buildInfo, unitAdd, unitUpdate, unitDel } from '@/api/basic/estate'
function getBase64(file) {
@ -147,18 +138,6 @@ function getBase64(file) {
reader.onerror = (error) => reject(error);
});
}
const handleConfirm = (rule,value,callback) => {
if(!value){
callback();
}else{
// callback()
if(/[\u4E00-\u9FA5]/g.test(value)) {
callback(new Error("不能输入中文!"));
}else{
callback();
}
}
}
export default {
props: {
show: Boolean,
@ -189,14 +168,13 @@ export default {
publicFloor:null,
manageBuildingId:null
},
rules:{
name:[{required:true,message:'请输入单元名称',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
floor:[{required:true,message:'请输入楼层数',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
name:[{required:true,message:'请输入单元名称',trigger:'blur'}],
floor:[{required:true,message:'请输入楼层数',trigger:'blur'}],
elevator:[{required:true,message:'是否有电梯',trigger:'change'}],
publicFloor:[{required:true,message:'公共楼层数',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
publicFloor:[{required:true,message:'公共楼层数',trigger:'blur'}],
}
},
}
};
},
methods: {
@ -345,20 +323,6 @@ export default {
fileChange(info) {
this.fileList = info.fileList
},
changeFile(data) {
if(data.file.status == "done") {
if(data.file.response.success == false) {
this.$message.error(data.file.response.msg);
} else {
this.$message.success('操作成功');
this.getData();
}
}
},
//
modelDownload() {
window.open('https://saas.kaidalai.cn/excelModel/单元导入模版.xlsx');
}
},
watch: {
type: {

@ -14,14 +14,6 @@
</div>
<div class="search-box">
<a-button class="add-btn" @click="addBuilding"></a-button>
<a-upload name="file" :action="`${$buildingUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button @click="modelDownload">
<a-icon type="copy" />模版下载
</a-button>
</div>
<a-table
:columns="columns"
@ -56,17 +48,10 @@
</span>
</div>
<curd-form :show='drawerConfig.show' :type="drawerConfig.type" @close='close' :editId='editId'></curd-form>
<a-modal title="批量导入操作成功" :visible="uploadVisible" @cancel="uploadVisible = false" :footer="null">
<div>以下为导入失败的用户</div>
<p v-for="(item,index) in uploadResult" :key="index">
{{item}}
</p>
</a-modal>
</div>
</template>
<script>
import store from "@/store";
import { columns,searchForm,ActionsList} from "./depend/config"
import { buildingList,buildingDel } from "@/api/basic/estate"
import curdForm from './depend/form.vue'
@ -95,13 +80,6 @@ export default {
//
tableData: [],
editId:undefined,
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
//
uploadVisible: false,
uploadResult: [],
};
},
created() {
@ -174,25 +152,6 @@ export default {
selectionChoosed(data) {
this.tableChoosed = data;
},
//
changeFile(data) {
if(data.file.status == "done") {
if(data.file.response.success == false) {
this.$message.error(data.file.response.msg);
} else {
this.$message.success('操作成功');
if(data.file.response.data) {
this.uploadResult = data.file.response.data;
this.uploadVisible = true;
}
this.getData();
}
}
},
//
modelDownload() {
window.open('https://saas.kaidalai.cn/excelModel/楼栋导入模版.xlsx');
}
},
};
</script>

@ -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">

@ -3,11 +3,6 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: 100
},
{
title: "住户姓名",
dataIndex: "name",
@ -22,7 +17,7 @@ export const columns = [
title: "居住房屋",
dataIndex: "build",
scopedSlots: { customRender: "build" },
width: 200
width: 380
},
{
title: "住户身份",
@ -57,14 +52,6 @@ export const columns = [
title: "住户身份证号",
dataIndex: "idCard",
},
{
title: "创建时间",
dataIndex: "createDate",
customRender:function(createDate){
let date = new Date(createDate).toLocaleString();
return date
}
},
{
title: "操作",
dataIndex: "action",

@ -27,14 +27,6 @@
</div>
<div class="search-box">
<a-button class="add-btn" @click="show.add = true">添加住户</a-button>
<a-upload name="file" :action="`${$residentUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button @click="modelDownload">
<a-icon type="copy" />模版下载
</a-button>
</div>
<div class="main">
<!-- 表格 -->
@ -61,7 +53,7 @@
</span>
<span slot="ids" slot-scope="text, row">
<a-tag v-for="(item,index) in row.residentListEstateVoList" :key="index">
{{item.identity==3?'租户':item.identity==1?'业主':item.identity==2?'业主亲属':'租户亲属'}}
{{item.identity==3?'租户':1?'业主':2?'业主亲属':'租户亲属'}}
</a-tag>
</span>
<span slot="type" slot-scope="text, row">
@ -242,17 +234,10 @@
</a-button>
</div>
</a-drawer>
<a-modal title="批量导入操作成功" :visible="uploadVisible" @cancel="uploadVisible = false" :footer="null">
<div>以下为导入失败的用户</div>
<p v-for="(item,index) in uploadResult" :key="index">
{{item}}
</p>
</a-modal>
</div>
</template>
<script>
import store from "@/store";
import {
columns,
pagination,
@ -316,13 +301,6 @@ export default {
],
tenant: [],
},
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
//
uploadVisible: false,
uploadResult: [],
};
},
mounted() {
@ -413,6 +391,7 @@ export default {
},
async insubmit() {
//
console.log(this.inform);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await moveIn(this.inform);
@ -435,6 +414,7 @@ export default {
this.show.in = false;
},
out(data) {
console.log(data);
//
this.$confirm({
title: "是否迁出",
@ -468,25 +448,7 @@ export default {
},
//
handlerBuilding(index) {
},
//
changeFile(data) {
if(data.file.status == "done") {
if(data.file.response.success == false) {
this.$message.error(data.file.response.msg);
} else {
this.$message.success('操作成功');
if(data.file.response.data) {
this.uploadResult = data.file.response.data;
this.uploadVisible = true;
}
this.getData();
}
}
},
//
modelDownload() {
window.open('https://saas.kaidalai.cn/excelModel/住户导入模版.xlsx');
console.log(index);
}
},
computed: {

@ -3,26 +3,21 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: "8%",
},
{
title: "房屋名称",
dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" },
width: "15%",
width: "20%",
},
{
title: "室内面积",
dataIndex: "indoorArea",
width: "12%",
width: "15%",
},
{
title: "建筑面积",
dataIndex: "constructionArea",
width: "12%",
width: "15%",
},
{
title: "房屋类型",

@ -20,20 +20,6 @@ export const form = {
estateImgUrls:[],
remarks:undefined,
}
const handleConfirm = (rule,value,callback) => {
if(!value){
callback();
}else{
// 正则判断失败抛出错误否则直接callback()
if(/[\u4E00-\u9FA5]/g.test(value)) {
callback(new Error("不能输入中文!"));
}else{
callback();
}
}
}
// 校验
export const rules = {
manageBuildingId:[
@ -47,7 +33,6 @@ export const rules = {
],
name: [
{ required: true, message: "请输入房屋名称", trigger: "blur" },
{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}
],
manageEstateTypeId: [
{ required: true, message: "请选择房屋类型", trigger: "change" },

@ -241,6 +241,7 @@ export default {
this.options.floor = 0
for(let item of this.options.unit){
if(item.id === data){
console.log(item);
this.options.floor = item.floor
}
}
@ -295,6 +296,7 @@ export default {
},
handleChange({ fileList }) {
this.fileList = fileList;
console.log(this.fileList);
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;

@ -19,18 +19,8 @@
</a-row>
</div>
<div class="search-box">
<div style="display: flex">
<a-button class="add-btn" @click="drawerConfig.addShow = true">添加房屋</a-button>
<a-upload name="file" :action="`${$houseUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button @click="modelDownload">
<a-icon type="copy" />模版下载
</a-button>
<a-button @click="drawerConfig.houseType = true">房屋配置</a-button>
</div>
<a-button class="add-btn" @click="drawerConfig.addShow = true">添加房屋</a-button>
<a-button @click="drawerConfig.houseType = true">房屋配置</a-button>
</div>
<div class="main">
<div style="margin-bottom: 16px">
@ -152,7 +142,7 @@
<a-tag
v-else-if="item.show==false" closable @close.prevent="delType(item.id)"
@click="editInput(item,index)" >
{{item.id+': '}}{{item.name}}
{{item.name}}
</a-tag>
</span>
<!-- addTag -->
@ -179,17 +169,10 @@
</a-button>
</div>
</a-drawer>
<a-modal title="批量导入操作成功" :visible="uploadVisible" @cancel="uploadVisible = false" :footer="null">
<div>以下为导入失败的用户</div>
<p v-for="(item,index) in uploadResult" :key="index">
{{item}}
</p>
</a-modal>
</div>
</template>
<script>
import store from "@/store";
import { columns, pagination, searchForm, ActionsList } from "./depend/config";
import { houseList, houseDel, isEnableLease, estateType, estateTypeInsert, estateTypeDel, estateTypeUpdate } from "@/api/basic/estate";
import vueForm from "./depend/form.vue";
@ -240,15 +223,7 @@ export default {
name:'关闭'
},
],
},
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
//
uploadVisible: false,
uploadResult: [],
fileList: []
}
};
},
created() {
@ -378,6 +353,7 @@ export default {
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
@ -410,26 +386,7 @@ export default {
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
//
changeFile(data) {
if(data.file.status == "done") {
if(data.file.response.success == false) {
this.$message.error(data.file.response.msg);
} else {
this.$message.success('操作成功');
if(data.file.response.data) {
this.uploadResult = data.file.response.data;
this.uploadVisible = true;
}
this.getData();
}
}
},
//
modelDownload() {
window.open('https://saas.kaidalai.cn/excelModel/房屋导入模版.xlsx');
}
},
},
computed: {
// selection
hasSelected() {

@ -1,25 +0,0 @@
export const columns = [
{
title: "违禁关键字",
width: "33%",
dataIndex: "keywords",
},
{
title: "替换字符",
width: "33%",
dataIndex: "replaces",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "240",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
replaces: [{ required: true, message: "请输入替换的字符", trigger: "blur" }],
keywords: [{ required: true, message: "请输入违禁字", trigger: "blur" }],
}

@ -1,236 +0,0 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>违禁字管理</span>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.keywords" style="width: 200px" placeholder="违禁关键字"></a-input>
<a-input v-model="form.replaces" style="width: 200px" placeholder="替换字符"></a-input>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">新增违禁字</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="action" slot-scope="text,record">
<span><a @click=edit(record)>编辑</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="mode==1?'新增违禁字':'编辑违禁字'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>违禁字信息</span>
<a-divider></a-divider>
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="12">
<a-form-model-item label="违禁关键字" prop="keywords">
<a-input style="width: 240px" v-model="addForm.keywords"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="替换字符" prop="replaces">
<a-input style="width: 240px" v-model="addForm.replaces"></a-input>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="detailClose"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import {getForbiddenList, addForbidden, findForbidden, updateForbidden, deleteForbidden} from "@/api/basic/forbidden"
import { rules, columns } from "./depend/config";
export default {
data() {
return {
form: {
keywords: '',
replaces: ''
},
addForm: {
keywords: '',
replaces: ''
},
mode: 1, //1 2
activeId: undefined,
activeName: 0,
rules: rules,
columns: columns,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
//
detailShow: false,
//
selectedRowKeys: [],
}
},
created() {
this.getData()
},
methods: {
getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getForbiddenList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form = {
keywords: '',
replaces: ''
},
this.getData()
},
handlerChange() {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
detailClose() {
this.addForm = {
name: '',
tel: '',
type: undefined,
status: undefined,
weight: 0,
}
this.detailShow = false
},
//
addConfirm() {
if(this.mode == 1) {
addForbidden(this.addForm).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else {
let obj = Object.assign(this.addForm, {id: this.activeId})
updateForbidden(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
//
edit(val) {
this.mode = 2;
findForbidden({prohibitedKeywordsId: val.id}).then(res => {
let data = res.data;
this.addForm = {
keywords: data.keywords,
replaces: data.replaces,
},
this.activeId = data.id
})
this.detailShow = true;
},
//
del(val) {
this.$confirm({
title: "是否删除该违禁字?",
icon:'delete',
onOk:async()=>{
let res = await deleteForbidden({prohibitedKeywordsIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的违禁字?",
icon:'delete',
onOk:async()=>{
let res = await deleteForbidden({prohibitedKeywordsIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -223,13 +223,13 @@ export default {
this.previewVisible = false;
},
//
// getAppName(val) {
// this.form.applicantId = undefined;
// findTenantByEstateId({estateId: val}).then(res => {
// let data = res.data;
// this.applicantIds = data;
// })
// },
getAppName(val) {
this.form.applicantId = undefined;
findTenantByEstateId({estateId: val}).then(res => {
let data = res.data;
this.applicantIds = data;
})
},
//
getDepartmentName(val) {
findToUser({pageNum: 1,size: 10000,positionId: val[2]}).then(res => {
@ -242,11 +242,6 @@ export default {
let v = val;
let index = val.length
this.form.estateId = v[index-1]
this.form.applicantId = undefined;
findTenantByEstateId({estateId: v[index-1]}).then(res => {
let data = res.data;
this.applicantIds = data;
})
}
},
watch: {

@ -355,12 +355,6 @@ export default {
//
//
columns: [
{
title: "创建时间",
key: "createDate",
dataIndex: "createDate",
width: 215,
},
{
title: "工单状态",
key: "tags",
@ -707,9 +701,11 @@ export default {
this.getData()
},
Actions(data) {
console.log(data);
this.activeAction = undefined;
},
selectionChoosed(data) {
console.log(data);
this.tableChoosed = data;
},
//

@ -44,7 +44,7 @@
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="onClose">
关闭
关闭
</a-button>
<a-button type="primary" @click="onSubmit"> </a-button>
</div>
@ -142,6 +142,7 @@ export default {
},
onSubmit() {
this.form.manageWorkOrderId = this.assignId;
console.log(this.form);
designate(this.form).then(res => {
if(res.code === 200){
this.$message.success(res.msg)

@ -1,13 +0,0 @@
<template>
<div>test</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -12,72 +12,39 @@
<!-- <a-col :span="1" class="box-cen"></a-col> -->
<!-- 登录 -->
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName">
<a-tab-pane key="1" tab="密码登录"></a-tab-pane>
<a-tabs v-model="activeName" @change="tabsSwitch">
<!-- <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-cascader
:options="cityList"
placeholder="请选择城市"
v-model="cityvalue"
:show-search="{ filter }"
@change="onChange"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
/>
<span class="form">
<a-select
v-model="communityCode"
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
@change="communityChange"
<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-select-option
v-for="(item) in communityList"
:key="item.id"
:value="item.code"
>{{ item.name }}</a-select-option
>
</a-select>
<a-input v-model="pwdLogin.username" placeholder="请输入手机号码"></a-input>
<a-input v-model="pwdLogin.password" 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-row> -->
<a-button
type="primary"
@click="passwordLogin"
style="
width: 90%;
margin-left: 30px;
margin-top: 20px;
height:38px;
margin-bottom: 10px;
"
@click="login"
style="width: 90%; margin: 30px"
>
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="24">
<a-checkbox v-model="isChecked"></a-checkbox>&nbsp;&nbsp;我已同
<a-col :span="22">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
<a href="/#/rule" target="tar">用户协议</a>
<a href="/#/yszc" target="tar">隐私政策</a>
</a-col>
<a-col :span="24" style="margin-top:16px">
<span class="logintext" @click="status = 3">忘记密码</span
<a-col :span="2">
<!-- <span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
>
> -->
</a-col>
</a-row>
</div>
@ -102,7 +69,6 @@
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
@change="communityChange"
>
<a-select-option
v-for="item in communityList"
@ -265,7 +231,7 @@
</template>
<script>
import { loginTel, loginPWD, sendTelCode, userInfo } from "../../api/public/login";
import { loginTel, sendTelCode, userInfo } from "../../api/public/login";
export default {
name: "Login",
data() {
@ -276,12 +242,7 @@ export default {
tel: "",
code: "",
},
pwdLogin: {
username: '',
password: '',
},
isChecked: false,
communityId: undefined,
communityCode: undefined,
rules: {
tel: [
@ -319,14 +280,6 @@ export default {
};
},
created() {
if(this.$route.query.token && this.$route.query.code) {
this.setToken(this.$route.query.token);
this.setCommunityCode(this.$route.query.code);
userInfo().then(result => {
this.setUserInfo(result.data);
this.$router.push("/");
})
}
this.keyupEnter();
this.getAllCity();
},
@ -410,30 +363,6 @@ export default {
}
});
},
passwordLogin() {
if (this.communityCode === undefined) {
this.$message.error("先选择小区");
return;
};
if (this.isChecked == false) {
this.$message.error("请阅读并同意《用户协议》");
return;
};
let obj = Object.assign(this.pwdLogin, {communityId: this.communityId})
loginPWD(obj).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
// token
this.setToken(res.data);
userInfo().then(result => {
this.setUserInfo(result.data);
this.$router.push("/");
})
} else {
this.$message.error(res.msg);
}
});
},
//
getCode() {
if (this.communityCode === undefined) {
@ -471,10 +400,9 @@ export default {
resetForm() {
this.$refs.ruleForm.resetFields();
},
//id
communityChange(value, option) {
this.communityId = option.key
}
tabsSwitch() {
console.log(this.activeName);
},
},
};
</script>

@ -140,6 +140,7 @@ export default {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -4,7 +4,7 @@ export const form = {
organizerId:undefined,
isShow:false,
activityObject:undefined,
content:'',
content:undefined,
registrationStartTime:undefined,
registrationEndTime:undefined,
activityStartTime:undefined,

@ -77,9 +77,6 @@
style="width: 80%"
:autosize="{minRows: 10}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -99,7 +96,6 @@
label="报名结束时间"
>
<a-date-picker
:disabledDate="disabledDate"
v-model="form.registrationEndTime"
value-format="YYYY-MM-DD HH:mm:ss"
/>
@ -116,7 +112,6 @@
<a-col :span="12">
<a-form-model-item prop="activityEndTime" label="活动结束时间">
<a-date-picker
:disabledDate="disabledDate2"
v-model="form.activityEndTime"
value-format="YYYY-MM-DD HH:mm:ss"
/>
@ -190,7 +185,6 @@
</template>
<script>
import moment from "moment";
import { form, rules, options } from "./form.js";
import {
activityInsert,
@ -273,22 +267,6 @@ export default {
}
})
},
//
disabledDate(value) {
let hdStartValue = moment(this.form.activityEndTime);
if (!value || !hdStartValue) {
return false;
}
return hdStartValue < value;
},
//
disabledDate2(value) {
let bmStartValue = moment(this.form.registrationEndTime);
if (!value || !bmStartValue) {
return false;
}
return bmStartValue >= value;
}
},
watch: {
editId: {

@ -125,6 +125,7 @@ export default {
},
methods: {
search(data) {
console.log(data);
this.searchForm = data;
this.getData()
},
@ -141,12 +142,14 @@ export default {
changeTime(data,start,end){
this.searchForm[start] = data[0]
this.searchForm[end] = data[1]
console.log(this.searchForm);
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -167,11 +170,13 @@ export default {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -137,6 +137,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await organizerUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -104,6 +104,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -124,11 +125,13 @@ export default {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -3,7 +3,7 @@ export const form = {
title:undefined,
object:undefined,
status:undefined,
content:'',
content:undefined,
coverImgUrls:[],
annexUrls:[],
}

@ -58,9 +58,6 @@
style="width: 80%"
:autosize="{ minRows: 12}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
封面图片
<commonUpload
@ -144,6 +141,7 @@ export default {
}
},
submit() {
console.log(this.documentList);
//
let arr = [];
for (let k of this.documentList) {
@ -164,6 +162,7 @@ export default {
}
}
this.form.coverImgUrls = pic;
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.editId === null) {
@ -175,6 +174,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await announcementUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
@ -243,6 +243,7 @@ export default {
this.form.coverImgUrls = [];
}
if (res.data.annexImgList.length > 0) {
console.log(res.data.annexImgList);
const file = [];
for (let item of res.data.annexImgList) {
let obj = {

@ -98,6 +98,7 @@ export default {
changeTime(data,start,end){
this.searchForm[start] = data[0]
this.searchForm[end] = data[1]
console.log(this.searchForm);
},
async getData() {
let res = await announcementList({
@ -114,6 +115,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -136,12 +138,14 @@ export default {
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -210,6 +210,7 @@ export default {
let res = await dynamicInfo({
communityDynamicId: this.id,
});
console.log(res.data)
this.detailData = res.data;
},
async getComment() {
@ -222,6 +223,7 @@ export default {
this.pagination.total = res.data.total;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',

@ -156,6 +156,8 @@ export default {
this.getData()
},
Actions(data) {
console.log(data);
console.log(this.selectedRowKeys);
this.activeAction = undefined;
if(data===1){
this.del(this.selectedRowKeys)
@ -167,6 +169,7 @@ export default {
this.$router.push({name:'DynamicDetail',params:{data:data.id}})
},
del(ids){
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -203,9 +206,11 @@ export default {
},
selectionChoosed(data) {
console.log(data);
this.selectedRowKeys = data;
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -117,6 +117,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -137,11 +138,13 @@ export default {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -1,161 +0,0 @@
<template>
<div>
<a-drawer title="职位设置" :width="540" :visible="show" :body-style="{ paddingBottom: '80px' }" @close="addClose">
<div class="drawer-content" style="padding: 16px">
职位类型
<a-divider></a-divider>
<!-- tags -->
<span v-for="item,index in typeList" :key="item.id">
<a-input
v-if="item.show==true"
ref="input"
v-focus
type="text"
size="small"
:style="{ width: '78px','padding-bottom':'3px','margin-right':'7px' }"
v-model="item.name"
@blur="editType(item)"
@keyup.enter="editType(item)"
/>
<a-tag
v-else-if="item.show==false" closable @close.prevent="delType(item.id)"
@click="editInput(item,index)" >
{{item.name}}
</a-tag>
</span>
<!-- addTag -->
<span>
<a-input
v-if="inputVisible"
ref="addInput"
type="text"
size="small"
:style="{ width: '78px','padding-bottom':'3px'}"
:value="typeForm.name"
@change="handleInputChange"
@blur="handleInputConfirm"
@keyup.enter="handleInputConfirm"
/>
<a-tag v-else style="background: #fff; borderStyle: dashed;" @click="addShow">
<a-icon type="plus" /> 新增类型
</a-tag>
</span>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
// import {getPhontTypeList, addPhontType, delPhontType,updatePhontType} from "@/api/operation/suggestion"
import {getComList, addComType, updateComType, delComType} from "@/api/operation/commission"
export default {
props: {
show: {
type: Boolean,
default: false,
},
},
data() {
return {
typeForm: {
name: ''
},
typeList: [],
inputVisible: false
}
},
created() {
this.getData()
},
methods: {
async getData() {
this.typeList = []
const res = await getComList();
const arr = res.data;
arr.forEach(ele => {
ele.show = false;
})
this.typeList = arr;
this.$emit("refresh");
},
//
editInput(obj, i) {
this.$set(this.typeList[i],'show',true)
this.$forceUpdate()
},
//
addShow(){
this.inputVisible = true;
this.$nextTick(function() {
this.$refs.addInput.focus();
});
},
//
async editType(item){
let res = await updateComType({
id: item.id,
name: item.name
})
if(res.code === 200){
item.show = false
this.$forceUpdate()
this.$message.success(res.msg)
}else{
this.$message.error(res.msg)
}
},
handleInputChange(e) {
this.typeForm.name = e.target.value;
},
//
async handleInputConfirm() {
if(this.typeForm.name === ''){
this.inputVisible = false;
return
}
let res = await addComType({
name:this.typeForm.name,
})
if(res.code === 200){
this.$message.success(res.msg);
this.inputVisible = false;
this.typeForm.name = '';
this.getData()
}else{
this.$message.error(res.msg);
}
},
//
delType(id){
this.$confirm({
title: "是否删除",
icon:'delete',
onOk:async()=>{
let res = await delComType({industryCommitteeTypeId: id})
if(res.code=== 200){
this.$message.success(res.msg);
this.getData()
}else{
this.$message.error(res.msg);
}
},
})
},
addClose() {
this.$emit("addClose");
},
},
watch: {
},
}
</script>
<style lang="less">
</style>

@ -1,36 +0,0 @@
export const columns = [
{
title: "成员姓名",
width: "15%",
dataIndex: "name",
},
{
title: "职位",
width: "15%",
dataIndex: "industryCommitteeTypeName",
},
{
title: "关联房屋",
width: "25%",
dataIndex: "buildingName",
scopedSlots: { customRender: "house" },
},
{
title: "创建时间",
width: "20%",
dataIndex: "createDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
appUserId: [{ required: true, message: "请选择住户", trigger: "change" }],
industryCommitteeTypeId: [{ required: true, message: "请选择职位", trigger: "change" }],
}

@ -1,379 +0,0 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>业委会</span>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.name" style="width: 200px" placeholder="成员名称"></a-input>
<a-select v-model="form.industryCommitteeTypeId" style="width: 200px" placeholder="职位">
<a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
{{item.name}}
</a-select-option>
</a-select>
<a-range-picker v-model="addTime" @change="addTimeChange" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['创建开始时间','创建结束时间']"></a-range-picker>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">添加人员</a-button>
<a-button style="margin: 10px" @click="addType" type="primary" ghost>职位设置</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="house" slot-scope="text,record">
{{record.buildingName}}号楼/{{record.unitName}}单元/{{record.estateName}}
</template>
<template slot="action" slot-scope="text,record">
<span><a @click=edit(record)>编辑</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="mode==1?'添加成员':'编辑成员'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="11">
<a-form-model-item label="选择房屋" prop="estateId" :rules="[{ required: true, message: '请选择房屋' }]">
<a-cascader placeholder="请选择楼栋/单元/房屋" v-model="casVal" @change="chooseHouse" style="width: 240px"
:field-names="{label: 'name', value: 'id', children: 'childList' }" :options="options.estateId">
</a-cascader>
</a-form-model-item>
</a-col>
<a-col :span="11">
<a-form-model-item label="成员姓名" prop="appUserId">
<a-select placeholder="请选择住户" style="width: 240px" v-model="addForm.appUserId">
<a-select-option v-for="(item) in applicantIds" :value="item.id" :key="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="11">
<a-form-model-item label="选择职位" prop="industryCommitteeTypeId">
<a-select placeholder="请选择职位" style="width: 240px" v-model="addForm.industryCommitteeTypeId">
<a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="11">
<a-form-model-item label="任职时间" prop="appointmentStartTime" :rules="[{ required: true, message: '请选择时间' }]">
<a-range-picker v-model=rzTime @change="rzTimeChange" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['任职开始时间','任职结束时间']"></a-range-picker>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="成员照片">
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" prop="remark">
<a-textarea placeholder="请输入备注不超过1024个字符" style="width: 560px" :autoSize="{minRows: 8}" v-model="addForm.remark"></a-textarea>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="detailClose"> </a-button>
</div>
</a-drawer>
<addType :show="addShow" @addClose="addShow = false" @refresh="getApi"></addType>
</div>
</template>
<script>
import {findOwnerByEstateId} from "@/api/basic/resident"
import {findEstateCascade} from "@/api/basic/estate"
import {getComList, addIndustryCom, delIndustryCom, updateIndustryCom, findIndustryCom} from "@/api/operation/commission"
import {getIndustryCommitteeList} from "@/api/operation/commission"
import { rules, columns } from "./depend/config";
import addType from "./depend/addType.vue";
export default {
components: {
addType,
},
data() {
return {
form: {
name: '',
industryCommitteeTypeId: undefined,
createDateStart: '',
createDateEnd: '',
},
addForm: {
estateId: undefined,
appUserId: undefined,
industryCommitteeTypeId: undefined,
appointmentStartTime: '',
appointmentEndTime: '',
imgUrls: [],
remark: '',
},
options: {
estateId: []
},
mode: 1, //1 2
activeId: undefined,
activeName: 0,
rules: rules,
columns: columns,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
addTime: [],
//
applicantIds: [],
casVal:[],
fileList:[],
rzTime: [],
detailShow: false,
//
selectedRowKeys: [],
//
addShow: false,
typeList: []
}
},
created() {
this.getApi()
this.getData()
},
methods: {
getApi() {
getComList().then(res => {
let data = res.data;
this.typeList = data;
});
findEstateCascade().then(res => {
let data = res.data;
this.options.estateId = data;
})
},
getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getIndustryCommitteeList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form = {
name: '',
industryCommitteeTypeId: undefined,
createDateStart: '',
createDateEnd: '',
},
this.getData()
},
handlerChange() {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
detailClose() {
this.addForm = {
estateId: undefined,
appUserId: undefined,
industryCommitteeTypeId: undefined,
appointmentStartTime: '',
appointmentEndTime: '',
imgUrls: [],
remark: '',
},
this.fileList = [],
this.casVal = [],
this.rzTime = [],
this.detailShow = false
},
//
rzTimeChange(val) {
this.addForm.appointmentStartTime = val[0];
this.addForm.appointmentEndTime = val[1];
},
addTimeChange(val) {
this.form.createDateStart = val[0];
this.form.createDateEnd = val[1];
},
//
chooseHouse(val) {
let v = val;
let index = val.length
this.addForm.estateId = v[index-1]
this.addForm.appUserId = undefined;
findOwnerByEstateId({estateId: v[index-1]}).then(res => {
let data = res.data;
this.applicantIds = data;
})
},
//
addConfirm() {
if(this.mode == 1) {
addIndustryCom(this.addForm).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else {
let obj = Object.assign(this.addForm, {id: this.activeId})
updateIndustryCom(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
//
edit(val) {
this.mode = 2;
findIndustryCom({industryCommitteeId: val.id}).then(res => {
let data = res.data;
findOwnerByEstateId({estateId: data.estateId}).then(res => {
let data = res.data;
this.applicantIds = data;
})
this.addForm = {
estateId: data.estateId,
appUserId: data.appUserId,
industryCommitteeTypeId: data.industryCommitteeTypeId,
appointmentStartTime: data.appointmentStartTime,
appointmentEndTime: data.appointmentEndTime,
imgUrls: [],
remark: data.remark,
}; //
if(data.imgList.length>0){
const pic = []
this.addForm.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
this.casVal = [data.buildingId,data.unitId,data.estateId];
this.rzTime = [data.appointmentStartTime,data.appointmentEndTime];
this.activeId = data.id
})
this.detailShow = true;
},
//
del(val) {
this.$confirm({
title: "是否删除该成员?",
icon:'delete',
onOk:async()=>{
let res = await delIndustryCom({industryCommitteeIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的成员?",
icon:'delete',
onOk:async()=>{
let res = await delIndustryCom({industryCommitteeIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
//
addType() {
this.addShow = true
},
//
handleChange(data) {
this.fileList = data;
this.addForm.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.addForm.imgUrls.push(ele.response.data)
}
})
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -22,7 +22,7 @@ export const columns = [
},
{
title: "内容",
width: "22%",
width: "15%",
dataIndex: "content",
scopedSlots: { customRender: "content" },
},

@ -82,10 +82,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="内容" prop="content">
<a-textarea style="width: 560px" :autosize="{minRows: 8}" placeholder="可输入不超过1024个字符的内容" v-model="addForm.content"></a-textarea>
<div>
已输入 {{addForm.content.length}} / 1024
</div>
<a-textarea style="width: 560px" :autosize="{minRows: 8}" placeholder="请输入内容" v-model="addForm.content"></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -164,9 +161,7 @@ export default {
this.getData()
},
handlerChange() {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
detailClose() {
this.addForm = {

@ -1,130 +0,0 @@
export const formItem = [
{
type: 'select',
label:'综合搜索',
prop:'comprehensiveSearchNumber',
placeholder:'请选择',
option:[{ id:1,name:'姓名'},{ id:2,name:'手机号'},{ id:3,name:'身份证号'}]
},
{
type: 'input',
prop:'comprehensiveSearch',
placeholder:'',
},
{
type: 'input',
label:'居住房屋',
prop:'residentialHousing',
placeholder:'楼栋-单元-房间号',
},
{
type: 'time',
label:'记录时间',
prop:'create',
start: 'createStartDate',
end: 'createEndDate'
},
{
type: 'select',
label:'是否健康',
prop:'isHealthy',
placeholder:'请选择',
option:[{ id:1,name:'是'},{ id:2,name:'否'}]
},
{
type: 'select',
label:'是否接触过阳性',
prop:'whetherExposedToPositive',
placeholder:'请选择',
option:[{ id:1,name:'是'},{ id:2,name:'否'}]
}
]
export const columns = [
{
title: "姓名",
dataIndex: "name",
width:"5%"
},
{
title: "房屋",
dataIndex: "house",
width:"5%"
},
{
title: "手机号",
dataIndex: "tel",
width: "5%"
},
{
title: "身份证号",
dataIndex: "idCard",
width:"5%"
},
{
title: "是否健康",
dataIndex: "isHealthy",
width: 30,
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "是否到过疫区",
dataIndex: "epidemicZone",
width: "5%",
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "是否接触过阳性",
dataIndex: "whetherExposedToPositive",
width:"5%",
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "体温",
dataIndex: "temperature",
width:"5%"
},
{
title: "记录时间",
dataIndex: "recordTime",
width:"5%"
},
{
title:"备注",
dataIndex:"remark",
width:"5%"
}
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -1,31 +0,0 @@
export const form = {
id:null,
comprehensiveSearchNumber:undefined,
comprehensiveSearch:undefined,
residentialHousing:undefined,
isHealthy:undefined,
epidemicZone:undefined,
whetherExposedToPositive:undefined,
create:undefined
}
export const rules = {
comprehensiveSearchNumber:[{required:true,message:'请输入标题',trigger:'blur'}],
comprehensiveSearch:[{required:true,message:'请输入内容',trigger:'blur'}],
residentialHousing:[{required:true,message:'请选择',trigger:'change'}],
isHealthy:[{required:true,message:'请选择',trigger:'change'}],
epidemicZone:[{required:true,message:'请选择',trigger:'change'}],
whetherExposedToPositive:[{required:true,message:'请选择',trigger:'change'}],
create:[{required:true,message:'请选择',trigger:'change'}],
}
export const options = {
isTrue:[
{ id:1, name:'是' },
{ id:0, name:'否' },
],
status: [
{ id:1, name:'启用中' },
{ id:2, name:'禁用中' },
]
}

@ -1,203 +0,0 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="title" label="标题">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="content" label="内容">
<a-input
v-model="form.content"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="status" label="状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isPublic" label="是否公开">
<a-select
v-model="form.isPublic"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isRating" label="是否可以评论">
<a-select
v-model="form.isRating"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
话题图片
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import { topicInsert,topicUpdate, topicInfo } from '@/api/operation/dynamic/topic'
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId:Number
},
data() {
return {
title: "新增话题",
form,
rules,
options,
fileList:[]
};
},
methods: {
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = []
this.form.imgUrls = []
this.$emit('addClose');
},
success() {
this.$emit('success');
this.addClose()
},
submit() {
// console.log(this.form)
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if(this.editId === null) {
let res = await topicInsert(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}else{
let res = await topicUpdate(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}
};
});
},
// handleChange(imgDataList) {
// this.fileList = imgDataList
// let arr = []
// imgDataList.forEach(ele => {
// arr.push(ele.response.data)
// })
// this.form.imgUrls = arr
// },
handleChange(data) {
this.fileList = data;
this.form.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.imgUrls.push(ele.response.data)
}
})
},
},
watch: {
editId:{
handler(val){
if(val!==null){
this.title = '修改话题'
this.form.id = val
this.form.imgUrls = [];
topicInfo({topicId:val}).then(res=>{
let data = res.data
this.form.title = data.title
this.form.content = data.content
this.form.status = data.status
this.form.isPublic = data.isPublic
this.form.isRating = data.isRating
if(data.imgList.length>0){
const pic = []
this.form.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
})
}else{
this.title = '新增话题'
}
},
immediate: true
}
}
};
</script>
<style></style>

@ -1,200 +0,0 @@
<template>
<div>
<div class="cardTitle">新冠健康打卡</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>下载登记二维码</a-button
>
<div style="margin-left: 16px">
<!-- :before-generate="startDownload"
:before-finish="finishDownload" -->
<download-excel
class="export-excel-wrapper"
:fetch="fetchData"
:fields="json_fields"
:before-finish="finishDownload"
name="收费标准.xls"
>
<!-- 上面可以自定义自己的样式还可以引用其他组件button -->
<el-button
type="init-button2"
icon="el-icon-folder-add"
plain
>导出Excel</el-button
>
</download-excel>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
<span slot="imgpic" slot-scope="text, row">
<img
v-if="row.imgList.length > 0"
:src="$ImgUrl(row.imgList[0].url)"
class="table-img"
alt=""
/>
<span v-else></span>
</span>
<span slot="switch" slot-scope="switchV, row">
<a-switch
checked-children="开"
un-checked-children="关"
:checked="switchV === 1"
@change="handleEnable(row)"
></a-switch>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 删除 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
</div>
</template>
<script>
import {DownloadExcel} from '@/plugins/DownloadExcel';
import {epidemicClockOnDelete,getClockOnList} from "@/api/operation/epidemic/index.js";
import { topicList} from "@/api/operation/dynamic/topic.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
export default {
components: {
addForm,
},
data() {
return {
drawer: {
show: false,
},
editId: null,
tableData: [],
searchForm: {
comprehensiveSearchNumber: undefined,
comprehensiveSearch: undefined,
residentialHousing: undefined,
startTime: undefined,
endTime: undefined,
typeOfAccess: undefined,
reasonForEntryAndExit: undefined
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
let res = await getClockOnList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
search(data){
this.searchForm = data;
this.getData()
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await epidemicClockOnDelete({ epidemicClockOnIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -1,121 +0,0 @@
export const formItem = [
{
type: 'select',
label:'综合搜索',
prop:'comprehensiveSearchNumber',
placeholder:'请选择',
option:[{ id:1,name:'姓名'},{ id:2,name:'手机号'},{ id:3,name:'身份证号'}]
},
{
type: 'input',
prop:'comprehensiveSearch',
placeholder:'',
},
{
type: 'input',
label:'居住房屋',
prop:'residentialHousing',
placeholder:'楼栋-单元-房间号'
},
{
type: 'time',
label:'记录时间',
prop:'create',
start: 'createStartDate',
end: 'createEndDate'
},
{
type: 'select',
label:'进出类型',
prop:'typeOfAccess',
placeholder:'请选择',
option:[{ id:0,name:'全部'},{ id:1,name:'进入'},{ id:2,name:'外出'}]
},
{
type: 'select',
label:'进出事由',
prop:'reasonsForEntryAndExit',
placeholder:'请选择',
option:[{ id:0,name:'全部'},{ id:1,name:'回家'},{ id:2,name:'采购'},{id:3,name:'上班'},{id:4,name:'其他'}]
}
]
export const columns = [
{
title: "姓名",
dataIndex: "name",
width:"5%",
},
{
title: "房屋",
dataIndex: "house",
width: "5%",
},
{
title: "手机号",
dataIndex: "tel",
width:"5%",
},
{
title: "进出类型",
dataIndex: "typeOfAccess",
width: "5%",
customRender: function (status) {
switch (status) {
case 1:
return '进入'
case 2:
return '外出'
}
}
},
{
title: "身份证号",
dataIndex: "idCard",
width: "5%",
},
{
title: "体温",
dataIndex: "temperature",
width:"5%",
},
{
title: "记录时间",
dataIndex: "recordTime",
width: "5%",
},
{
title: "进出事由",
dataIndex: "reasonsForEntryAndExit",
width: "5%",
customRender: function (status) {
switch (status) {
case 1:
return '回家'
case 2:
return '采购'
case 3:
return '上班'
case 4:
return '其他'
}
}
},
{
title: "备注",
dataIndex: "remark",
width: "5%",
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -1,30 +0,0 @@
export const form = {
id:null,
comprehensiveSearchNumber:undefined,
comprehensiveSearch:undefined,
residentialHousing:undefined,
create:undefined,
typeOfAccess:undefined,
reasonsForEntryAndExit:undefined,
}
export const rules = {
comprehensiveSearchNumber:[{required:true,message:'请选择',trigger:'change'}],
comprehensiveSearch:[{required:true,message:'请输入内容',trigger:'blur'}],
residentialHousing:[{required:true,message:'请输入内容',trigger:'blur'}],
create:[{required:true,message:'请选择',trigger:'change'}],
typeOfAccess:[{required:true,message:'请选择',trigger:'change'}],
reasonsForEntryAndExit:[{required:true,message:'请选择',trigger:'change'}],
}
export const options = {
isTrue:[
{ id:1, name:'是' },
{ id:0, name:'否' },
],
status: [
{ id:1, name:'启用中' },
{ id:2, name:'禁用中' },
]
}

@ -1,202 +0,0 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="title" label="姓名">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="content" label="内容">
<a-input
v-model="form.content"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="status" label="状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isPublic" label="是否公开">
<a-select
v-model="form.isPublic"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isRating" label="是否可以评论">
<a-select
v-model="form.isRating"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
话题图片
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import { topicInsert,topicUpdate, topicInfo } from '@/api/operation/dynamic/topic'
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId:Number
},
data() {
return {
title: "新增话题",
form,
rules,
options,
fileList:[]
};
},
methods: {
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = []
this.form.imgUrls = []
this.$emit('addClose');
},
success() {
this.$emit('success');
this.addClose()
},
submit() {
// console.log(this.form)
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if(this.editId === null) {
let res = await topicInsert(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}else{
let res = await topicUpdate(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}
};
});
},
// handleChange(imgDataList) {
// this.fileList = imgDataList
// let arr = []
// imgDataList.forEach(ele => {
// arr.push(ele.response.data)
// })
// this.form.imgUrls = arr
// },
handleChange(data) {
this.fileList = data;
this.form.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.imgUrls.push(ele.response.data)
}
})
},
},
watch: {
editId:{
handler(val){
if(val!==null){
this.title = '修改话题'
this.form.id = val
this.form.imgUrls = [];
topicInfo({topicId:val}).then(res=>{
let data = res.data
this.form.title = data.title
this.form.content = data.content
this.form.status = data.status
this.form.isPublic = data.isPublic
this.form.isRating = data.isRating
if(data.imgList.length>0){
const pic = []
this.form.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
})
}else{
this.title = '新增话题'
}
},
immediate: true
}
}
};
</script>
<style></style>

@ -1,245 +0,0 @@
<template>
<div>
<div class="cardTitle">新冠防护登记</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="jumpTo"
>下载登记二维码</a-button
>
<div style="margin-left: 16px">
<!-- :before-generate="startDownload"
:before-finish="finishDownload" -->
<download-excel
class="export-excel-wrapper"
:fetch="fetchData"
:fields="json_fields"
:before-finish="finishDownload"
name="收费标准.xls"
>
<!-- 上面可以自定义自己的样式还可以引用其他组件button -->
<a-button
type="init-button2"
icon="el-icon-folder-add"
plain
>导出Excel</a-button
>
</download-excel>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
<span slot="imgpic" slot-scope="text, row">
<img
v-if="row.imgList.length > 0"
:src="$ImgUrl(row.imgList[0].url)"
class="table-img"
alt=""
/>
<span v-else></span>
</span>
<span slot="switch" slot-scope="switchV, row">
<a-switch
checked-children="开"
un-checked-children="关"
:checked="switchV === 1"
@change="handleEnable(row)"
></a-switch>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 删除 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
</div>
</template>
<script>
import {DownloadExcel} from '@/plugins/DownloadExcel'
import {getRegistersList,protectionRegistrationDelete,registerExport} from "@/api/operation/epidemic/index.js";
import { topicList, topicDelete } from "@/api/operation/dynamic/topic.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
export default {
components: {
addForm,
},
data() {
return {
drawer: {
show: false,
},
editId: null,
tableData: [],
searchForm: {
comprehensiveSearchNumber: undefined,
comprehensiveSearch: undefined,
residentialHousing: undefined,
startTime: undefined,
endTime: undefined,
typeOfAccess: undefined,
reasonForEntryAndExit: undefined
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
let res = await getRegistersList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
console.log(res)
},
search(data){
this.searchForm = data;
this.getData()
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
console.log(ids);
let res = await protectionRegistrationDelete({ protectionRegistrationIds : ids });
console.log(res);
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
async exportData(){
let res = await registerExport({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
console.log(res)
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
jumpTo(){
this.$router.replace('/videoFusion')
},
async fetchData() {
let Excel = []
let params = {
url: 'userProtectionRegistrationList',
data: {
pageNum: 1,
size: 100
}
}
const data = await DownloadExcel(params, this)
return data
},
// Excel
ExcelLoading(page, pageCount) {
const Loading = this.$loading({
lock: true,
text: `正在导出Excel${page}`,
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
Loading.text = `正在导出Excel ${page}/${pageCount}`
console.log(Loading.text)
},
// Excel
finishDownload() {
const Loading = this.$loading()
Loading.close()
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -1,127 +0,0 @@
export const formItem = [
{
type: 'select',
label:'综合搜索',
prop:'comprehensiveSearchNumber',
placeholder:'请选择',
option:[{ id:1,name:'姓名'},{ id:2,name:'手机号'},{ id:3,name:'身份证号'}]
},
{
type: 'input',
prop:'comprehensiveSearch',
placeholder:'',
},
{
type: 'input',
label:'居住房屋',
prop:'residentialHousing',
placeholder:'楼栋-单元-房间号',
},
{
type: 'select',
label:'是否健康',
prop:'isHealthy',
placeholder:'请选择',
option:[{ id:0,name:'全部'},{ id:1,name:'是'},{ id:2,name:'否'}]
},
{
type: 'time',
label:'记录时间',
prop:'status'
},
{
type: 'select',
label:'是否到过疫区',
prop:'epidemicZone',
placeholder:'请选择',
option:[{ id:0,name:'全部'},{ id:1,name:'是'},{ id:2,name:'否'}]
},
{
type: 'select',
label:'是否接触过阳性',
prop:'whetherExposedToPositive',
placeholder:'请选择',
option:[{ id:0,name:'全部'},{ id:1,name:'是'},{ id:2,name:'否'}]
},
]
export const columns = [
{
title: "姓名",
dataIndex: "name",
width: "10%",
},
{
title: "房屋",
dataIndex: "house",
width: "10%",
},
{
title: "手机号",
dataIndex: "tel",
width:"10%",
},
{
title: "是否健康",
dataIndex: "isHealthy",
width: "10%",
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "是否到过疫区",
dataIndex: "epidemicZone",
width: "10%",
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "是否接触过阳性",
dataIndex: "whetherExposedToPositive",
width: "10%",
customRender: function (status) {
switch (status) {
case 1:
return '是'
case 2:
return '否'
}
}
},
{
title: "体温",
dataIndex: "temperature",
width: "10%"
},
{
title: "记录时间",
dataIndex: "recordTime",
width: "10%",
},
{
title: "备注",
dataIndex: "remark",
width: "10%",
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -1,28 +0,0 @@
export const form = {
id:null,
comprehensiveSearchNumber:undefined,
comprehensiveSearch:undefined,
residentialHousing:undefined,
isHealthy:undefined,
epidemicZone:undefined,
whetherExposedToPositive:undefined,
}
export const rules = {
comprehensiveSearchNumber:[{required:true,message:'请输入标题',trigger:'blur'}],
comprehensiveSearch:[{required:true,message:'请输入内容',trigger:'blur'}],
residentialHousing:[{required:true,message:'请选择',trigger:'change'}],
isHealthy:[{required:true,message:'请选择',trigger:'change'}],
epidemicZone:[{required:true,message:'请选择',trigger:'change'}],
whetherExposedToPositive:[{required:true,message:'请选择',trigger:'change'}]
}
export const options = {
isTrue:[
{ id:1, name:'是' },
{ id:0, name:'否' },
],
status: [
{ id:1, name:'启用中' },
{ id:2, name:'禁用中' },
]
}

@ -1,202 +0,0 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="title" label="标题">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="content" label="内容">
<a-input
v-model="form.content"
placeholder="请输入标题"
style="width: 60%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="status" label="状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isPublic" label="是否公开">
<a-select
v-model="form.isPublic"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item prop="isRating" label="是否可以评论">
<a-select
v-model="form.isRating"
placeholder="请选择"
style="width: 60%"
>
<a-select-option
v-for="item in options.isTrue"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
话题图片
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import { topicInsert,topicUpdate, topicInfo } from '@/api/operation/dynamic/topic'
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId:Number
},
data() {
return {
title: "新增话题",
form,
rules,
options,
fileList:[]
};
},
methods: {
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = []
this.form.imgUrls = []
this.$emit('addClose');
},
success() {
this.$emit('success');
this.addClose()
},
submit() {
// console.log(this.form)
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if(this.editId === null) {
let res = await topicInsert(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}else{
let res = await topicUpdate(this.form)
if(res.code===200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}
};
});
},
// handleChange(imgDataList) {
// this.fileList = imgDataList
// let arr = []
// imgDataList.forEach(ele => {
// arr.push(ele.response.data)
// })
// this.form.imgUrls = arr
// },
handleChange(data) {
this.fileList = data;
this.form.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.imgUrls.push(ele.response.data)
}
})
},
},
watch: {
editId:{
handler(val){
if(val!==null){
this.title = '基本详情'
this.form.id = val
this.form.imgUrls = [];
topicInfo({topicId:val}).then(res=>{
let data = res.data
this.form.title = data.title
this.form.content = data.content
this.form.status = data.status
this.form.isPublic = data.isPublic
this.form.isRating = data.isRating
if(data.imgList.length>0){
const pic = []
this.form.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
})
}else{
this.title = '新增话题'
}
},
immediate: true
}
}
};
</script>
<style></style>

@ -1,176 +0,0 @@
<template>
<div>
<div class="cardTitle">新冠返程登记</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>下载登记二维码</a-button
>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>EXCEL导出</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
</a-space>
</span>
<span slot="imgpic" slot-scope="text, row">
<img
v-if="row.imgList.length > 0"
:src="$ImgUrl(row.imgList[0].url)"
class="table-img"
alt=""
/>
<span v-else></span>
</span>
<span slot="switch" slot-scope="switchV, row">
<a-switch
checked-children="开"
un-checked-children="关"
:checked="switchV === 1"
@change="handleEnable(row)"
></a-switch>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 删除 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
</div>
</template>
<script>
import {getReturnRegistersList,returnRegistrationDelete} from "@/api/operation/epidemic/index.js";
import { topicList, topicDelete } from "@/api/operation/dynamic/topic.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
export default {
components: {
addForm,
},
data() {
return {
drawer: {
show: false,
},
editId: null,
tableData: [],
searchForm: {
title: "",
status: undefined,
isPublic: undefined,
isRating: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
let res = await getReturnRegistersList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
search(data){
this.searchForm = data;
this.getData()
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await returnRegistrationDelete({ returnRegistrationIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -1,4 +0,0 @@
<!DOCTYPE html>
<div>
hello
</div>

@ -1,13 +0,0 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -1,24 +0,0 @@
import JsonExcel from 'vue-json-excel'
import { GetTableData } from '@/api/basic'
export async function DownloadExcel(params, that) {
let Excel = []
const response = await GetTableData(params)
Excel.push(...response.tableList)
if (response.pageCount > 1) {
for (let i = 1; i < response.pageCount; i++) {
params.pageNum = i + 1
const data = await GetTableData(params)
that.ExcelLoading(i, response.pageCount)
Excel.push(...data.tableList)
}
}
return Excel
}
export async function partDownloadExcel(params) {
let Excel = []
const response = await GetTableData(params)
console.log(response);
Excel.push(...response.tableList)
return Excel
}

@ -1,20 +0,0 @@
<template>
<div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;"></div>
</template>
<script>
export default({
data(){
return{
}
},
methods:{
},
created(){
}
})
</script>

@ -1,141 +0,0 @@
export const form= {
type: 1,
name: '',
facilitiesCategoryId: undefined,
code: '',
status: undefined,
createStartDate: undefined,
createEndDate: undefined,
}
export const addForm = {
name: '',
address: '',
facilitiesCategoryId: undefined,
brand: '',
procurementCosts: '',
purchasingManufacturer: '',
manufacturerPhone: '',
warrantyPeriodYears: 0,
warrantyPeriodMonths: 0,
validityStart: '',
validityEnd: '',
openStartDate: '',
openEndDate: '',
remakes: '',
docUrls: [],
}
export const columns = [
{
title: "设施编号",
width: "10%",
dataIndex: "code",
},
{
title: "设施分类名称",
width: "8%",
dataIndex: "facilitiesCategoryName",
},
{
title: "设施名称",
width: "9%",
dataIndex: "name",
},
{
title: "添加人",
width: "8%",
dataIndex: "createName",
},
{
title: "设施状态",
width: "8%",
dataIndex: "status",
customRender: function(status) {
switch(status) {
case 1: return '空置中'
case 2: return '使用中'
case 3: return '已停用'
}
}
},
{
title: "设施品牌",
width: "8%",
dataIndex: "brand",
},
{
title: "采购费用(元)",
width: "8%",
dataIndex: "procurementCosts",
},
{
title: "采购厂家",
width: "8%",
dataIndex: "purchasingManufacturer",
},
{
title: "厂家电话",
width: "8%",
dataIndex: "manufacturerPhone",
},
{
title: "质保期限",
width: "6%",
dataIndex: "warrantyPeriodYears",
scopedSlots: { customRender: "quality" },
},
{
title: "设备有效期",
width: "16%",
dataIndex: "validityStart",
scopedSlots: { customRender: "time" },
},
// {
// title: "设备有效期开始",
// width: "8%",
// dataIndex: "validityStart",
// },
// {
// title: "设备有效期结束",
// width: "8%",
// dataIndex: "validityEnd",
// },
{
title: "文件",
width: "12%",
dataIndex: "docList",
scopedSlots: { customRender: "document" },
},
{
title: "备注",
width: "8%",
dataIndex: "remakes",
},
{
title: "添加时间",
width: "16%",
dataIndex: "createDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
}
export function doStr(str, number) {
if(str.length >= number) {
return str.substr(0,number-1) + '...'
} else {
return str
}
}

@ -1,134 +0,0 @@
<template>
<div>
<a-drawer title="详情" :width="720" :visible="show" :body-style="{ paddingBottom: '80px' }" @close="detailClose">
<div class="drawer-content" style="padding: 16px">
<div class="order-detail-title">{{detailInfo.name}}</div>
<div class="order-detail-subtitle">分类{{detailInfo.facilitiesCategoryName}}
<a-tag style="margin-left: 16px:float: right">{{detailInfo.status==1?'空置中':detailInfo.status==2?'使用中':'已停用'}}</a-tag>
</div>
<a-divider></a-divider>
<a-descriptions layout="vertical" style="margin-left: 6px">
<a-descriptions-item label="开放时间">{{detailInfo.openStartDate}} - {{detailInfo.openEndDate}}</a-descriptions-item>
<a-descriptions-item label="设施位置">{{detailInfo.address}}</a-descriptions-item>
<a-descriptions-item label="创建时间">{{detailInfo.createDate}}</a-descriptions-item>
<a-descriptions-item label="备注" :span="2">{{detailInfo.remakes}}</a-descriptions-item>
<a-descriptions-item label="是否开启">{{detailInfo.status==2?'是':'否'}}</a-descriptions-item>
<a-descriptions-item label="上传文件" :span="3">
<div v-for="(item,index) in detailInfo.docList" :key="index">
<a :href="$ImgUrl(item.url)" target="tar">{{item.url}}</a>
</div>
</a-descriptions-item>
</a-descriptions>
<div class="order-detail-title" style="margin-top: 16px">设备启停记录</div>
<a-divider></a-divider>
<a-table :columns="columns" :data-source="tableData" :pagination="pagination" @change="handlerChange">
</a-table>
</div>
</a-drawer>
</div>
</template>
<script>
import {findFacilityInfo,findRecordList} from "@/api/operation/facility"
export default {
props: {
show: {
type: Boolean,
default: false,
},
detailId: Number,
},
data() {
return {
detailInfo: {},
activeId: undefined,
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
columns: [
{
title: "操作时间",
width: "25%",
dataIndex: "stopDate",
},
{
title: "执行操作",
width: "25%",
dataIndex: "type",
customRender: function(type) {
if(type == 1) {return '启用'}
else {return '停用'}
}
},
{
title: "操作原因",
width: "50%",
dataIndex: "stopReason",
},
],
tableData: [],
}
},
methods: {
detailClose() {
this.$emit("detailClose");
},
handlerChange(val) {
let obj = {
facilitiesManageId: this.activeId,
pageNum: val.current,
size: val.pageSize
};
findRecordList(obj).then(res => {
this.tableData = res.data.rows
this.pagination.total = res.data.total
})
}
},
watch: {
detailId: {
handler(val) {
if (val != null) {
this.activeId = val;
findFacilityInfo({facilitiesManageId: val}).then(res => {
let data = res.data;
this.detailInfo = data;
});
let obj = {
facilitiesManageId: val,
pageNum: this.pagination.current,
size:this.pagination.pageSize
}
findRecordList(obj).then(res => {
this.tableData = res.data.rows
this.pagination.total = res.data.total
})
}
},
immediate: true,
},
},
}
</script>
<style lang="less">
.order-detail-title {
padding: 8px;
font-weight: 500;
font-size: 18px;
line-height: 25px;
}
.order-detail-subtitle {
padding: 8px;
font-weight: 400;
font-size: 14px;
line-height: 20px;
color: rgba(0, 0, 0, 0.65);
}
</style>

@ -1,456 +0,0 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<!-- <span>{{form.type == 1?'设施管理':'设备管理'}}</span> -->
<a-radio-group
v-model="form.type"
button-style="solid"
@change="typeChange"
>
<a-radio-button :value="1"> 设施管理 </a-radio-button>
<a-radio-button :value="2"> 设备管理 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.name" style="width: 200px" :placeholder="form.type == 1 ?'设施名称':'设备名称'"></a-input>
<a-select v-model="form.facilitiesCategoryId" style="width: 200px" :placeholder="form.type == 1 ?'设施分类':'设备分类'">
<a-select-option v-for="(item) in faList" :value="item.id" :key="item.id">
{{item.name}}
</a-select-option>
</a-select>
<a-input v-model="form.code" style="width: 200px" :placeholder="form.type == 1 ?'设施编号':'设备编号'"></a-input>
<a-select v-model="form.status" style="width: 200px" :placeholder="form.type == 1 ?'设施状态':'设备状态'">
<a-select-option :value="1">空置中</a-select-option>
<a-select-option :value="2">使用中</a-select-option>
<a-select-option :value="3">已停用</a-select-option>
</a-select>
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['添加开始时间','添加结束时间']"></a-range-picker>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="addShow = true;mode = 1">{{form.type == 1 ?'添加设施':'添加设备'}}</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData" :pagination="pagination" @change="handlerChange" :scroll="{ x: 3200 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="quality" slot-scope="text,row">
{{row.warrantyPeriodYears}} {{row.warrantyPeriodMonths}} 个月
</template>
<template slot="time" slot-scope="text,row">
{{row.validityStart}} {{row.validityEnd}}
</template>
<template slot="document" slot-scope="text,row">
<div v-for="(item,index) in row.docList" :key="index">
<a :href="$ImgUrl(item.url)" target="tar">{{item.url}}</a>
</div>
</template>
<template slot="action" slot-scope="text,row">
<span><a @click=edit(row)>编辑</a></span>
<span><a style="margin-left: 8px" @click=detail(row)>详情</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(row)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="form.type==1&&mode==1?'添加设施分类':form.type==2&&mode==1?'添加设备分类':form.type==1&&mode==2?'编辑设施分类':'编辑设备分类'"
:width="720" :visible="addShow" :body-style="{ paddingBottom: '60px' }" @close="addClose">
<div class="drawer-content">
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="12">
<a-form-model-item :label="form.type == 1 ?'设施名称':'设备名称'" prop="name">
<a-input style="width: 300px" placeholder="请输入名称" v-model="addForm.name"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item :label="form.type == 1 ?'设施位置':'设备位置'" prop="address">
<a-input style="width: 300px" placeholder="请输入位置" v-model="addForm.address"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item :label="form.type == 1 ?'设施分类':'设备分类'" prop="facilitiesCategoryId">
<a-select style="width: 300px" placeholder="请选择分类" v-model="addForm.facilitiesCategoryId">
<a-select-option v-for="(item) in faList" :value="item.id" :key="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item :label="form.type == 1 ?'设施品牌':'设备品牌'" prop="brand">
<a-input style="width: 300px" placeholder="请输入品牌" v-model="addForm.brand"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购费用" prop="brand">
¥ <a-input-number :min="0" :step="0.01" style="width: 150px;margin-left:8px" placeholder="请输入" v-model="addForm.procurementCosts"></a-input-number>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购厂家" prop="brand">
<a-input style="width: 300px" placeholder="请输入" v-model="addForm.purchasingManufacturer"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="厂家电话" prop="brand">
<a-input style="width: 300px" placeholder="请输入" v-model="addForm.manufacturerPhone"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="质保期限" prop="brand">
<a-input-number :min="0" style="width: 120px" placeholder="请输入" v-model="addForm.warrantyPeriodYears"></a-input-number>
<a-input-number :min="0" :max="12" style="width: 120px" placeholder="请输入" v-model="addForm.warrantyPeriodMonths"></a-input-number> 个月
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="有效期" prop="brand">
<a-range-picker @change="changeAT" v-model="actTime" style="width: 300px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['有效期开始','有效期结束']"></a-range-picker>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="开放时间" prop="brand">
<a-range-picker @change="changeOT" v-model="openTime" :mode="['time','time']" show-time format="HH:mm:ss" value-format="HH:mm" style="width: 300px" :placeholder="['开放时间开始','开放时间结束']"></a-range-picker>
</a-form-model-item>
</a-col>
<a-col :span="22">
<a-form-model-item label="上传文件" prop="brand">
<a-upload
name="file"
:multiple="true"
:action="`${$upload}`"
:file-list="documentList"
accept=".doc,.DOC,.xls,.XLS,.xlsx,.XLSX,.pdf,.PDF"
:headers="uploadHeaders"
@change="changeFile"
:beforeUpload='beforeUpload'
>
<a-button> <a-icon type="upload" /> 上传附件</a-button>
</a-upload>
</a-form-model-item>
</a-col>
<a-col :span="22">
<a-form-model-item label="备注" prop="brand">
<a-textarea :autosize="{minRows:8}" v-model="addForm.remakes" placeholder="请输入备注不超过1024字"></a-textarea>
<div>
已输入 {{addForm.remakes.length}} / 1024
</div>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">确认</a-button>
<a-button @click="addClose"> </a-button>
</div>
</a-drawer>
<detailForm :show="detailShow" @detailClose="detailClose" :detailId="detailId"></detailForm>
</div>
</template>
<script>
import store from "@/store";
import detailForm from "./depend/detail.vue";
import {getFacilitiesList} from "@/api/operation/facility"
import {facilityInfoList,addFacilityInfo,updateFacilityInfo,findFacilityInfo,delFacilityInfo} from "@/api/operation/facility"
import { form ,addForm, rules, columns } from "./depend/config";
export default {
components: {
detailForm,
},
data() {
return {
form:form,
columns: columns,
rules: rules,
faList: [],
tableData: [],
selTime: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
selectedRowKeys: [],
//
addForm: addForm,
actTime: [],
openTime: [],
addShow: false,
mode: 1,
activeId: undefined,
fileList: [],
//
documentList: [],
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
//
detailShow: false,
detailId: undefined
}
},
created() {
this.getApi()
this.getData()
},
methods: {
getApi() {
let obj = {
pageNum: 1,size: 1000,type: this.form.type
}
getFacilitiesList(obj).then(res => {
let data = res.data.rows;
this.faList = data;
})
},
getData() {
let obj = Object.assign(this.form, {pageNum:this.pagination.current,size:this.pagination.pageSize})
facilityInfoList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form.name = '';
this.form.facilitiesCategoryId = undefined;
this.form.code = '';
this.form.status = undefined;
this.form.createStartDate = '';
this.form.createEndDate = '';
this.getData()
},
handlerTime() {
this.form.createStartDate = val[0];
this.form.createEndDate = val[1];
},
changeAT(val) {
this.addForm.validityStart = val[0];
this.addForm.validityEnd = val[1];
},
changeOT(val) {
this.addForm.openStartDate = val[0];
this.addForm.openEndDate = val[1];
},
typeChange() {
this.getApi()
this.getData()
},
handlerChange(val) {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的模版?",
icon:'delete',
onOk:async()=>{
let res = await delFacilityInfo({facilitiesManageIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
del(val) {
this.$confirm({
title: "是否删除该信息?",
icon:'delete',
onOk:async()=>{
let res = await delFacilityInfo({facilitiesManageIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
edit(val) {
this.activeId = val.id
findFacilityInfo({facilitiesManageId: val.id}).then(res => {
let data = res.data
this.addForm = {
name: data.name,
address: data.address,
facilitiesCategoryId: data.facilitiesCategoryId,
brand: data.brand,
procurementCosts: data.procurementCosts,
purchasingManufacturer: data.purchasingManufacturer,
manufacturerPhone: data.manufacturerPhone,
warrantyPeriodYears: data.warrantyPeriodYears,
warrantyPeriodMonths: data.warrantyPeriodMonths,
validityStart: data.validityStart,
validityEnd: data.validityEnd,
openStartDate: data.openStartDate.substr(0,5),
openEndDate: data.openEndDate.substr(0,5),
remakes: data.remakes,
docUrls: [],
};
this.actTime = [data.validityStart,data.validityEnd];
this.openTime = [data.openStartDate,data.openEndDate];
if (res.data.docList.length > 0) {
const file = [];
for (let item of res.data.docList) {
let obj = {
name: item.url.split("_")[0] + "." + item.url.split(".")[1],
url: this.$ImgUrl(item.url),
uid: item.url.split("_")[1],
status: "done",
thumbUrl: this.$ImgUrl(item.url),
};
file.push(obj);
}
this.documentList = file;
} else {
this.addForm.docUrls = [];
this.documentList= [];
};
this.addShow = true;
})
this.mode = 2;
},
addConfirm() {
//
let arr = [];
for (let k of this.documentList) {
if (k.response) {
arr.push(k.response.data);
} else {
arr.push(k.url.split("/")[k.url.split("/").length - 1]);
}
}
this.addForm.docUrls = arr;
if(this.mode == 1) {
let obj = Object.assign(this.addForm,{type: this.form.type})
addFacilityInfo(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.addClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else if (this.mode == 2) {
let obj = Object.assign(this.addForm,{id: this.activeId,type: this.form.type})
updateFacilityInfo(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.addClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
addClose() {
this.addForm = {
name: '',
address: '',
facilitiesCategoryId: undefined,
brand: '',
procurementCosts: '',
purchasingManufacturer: '',
manufacturerPhone: '',
warrantyPeriodYears: 0,
warrantyPeriodMonths: 0,
validityStart: '',
validityEnd: '',
openStartDate: '',
openEndDate: '',
remakes: '',
docUrls: [],
};
this.openTime = [];
this.actTime = [];
this.documentList = [];
this.addShow = false;
},
//
detail(val) {
this.detailId = val.id;
this.detailShow = true;
},
detailClose() {
this.detailShow = false;
this.detailId = null;
},
//
changeFile(info) {
this.documentList = info.fileList;
if (info.file.status !== "uploading") {
console.log(info.file, info.fileList);
}
if (info.file.status === "done") {
this.$message.success(`${info.file.name} 上传成功`);
// this.form.annexUrls.push(info.file.response.data);
} else if (info.file.status === "error") {
this.$message.error(`${info.file.name} 上传失败`);
}
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
</style>

@ -1,85 +0,0 @@
export const columns = [
{
title: "预约时间",
width: "10%",
dataIndex: "createDate",
},
{
title: "预约编号",
width: "12%",
dataIndex: "code",
},
{
title: "预约状态",
width: "7%",
dataIndex: "status",
customRender: function (type) {
switch (type) {
case 1: return '未签到'
case 2: return '已签到'
case 3: return '已作废'
case 4: return '已取消'
case 5: return '已结束'
}
}
},
{
title: "预约人",
width: "7%",
dataIndex: "reservationPerson",
},
{
title: "预约人名称",
width: "7%",
dataIndex: "reservationPersonName",
},
{
title: "预约开始时间",
width: "10%",
dataIndex: "reserveStartDate",
},
{
title: "预约结束时间",
width: "10%",
dataIndex: "reserveEndDate",
},
{
title: "用户反馈内容",
width: "10%",
dataIndex: "feedback",
},
{
title: "作废原因",
width: "12%",
dataIndex: "nullifyReason",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const replyColumns = [
{
title: "创建人",
width: "43%",
dataIndex: "createUserType",
scopedSlots: { customRender: "create" },
},
{
title: "反馈内容",
width: "43%",
dataIndex: "content",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "13%",
scopedSlots: { customRender: "action" },
},
]

@ -1,343 +0,0 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>预约管理</span>
<a-radio-group
v-model="form.status"
button-style="solid"
@change="typeChange"
>
<a-radio-button :value="undefined"> 全部 </a-radio-button>
<a-radio-button :value="1"> 未签到 </a-radio-button>
<a-radio-button :value="2"> 已签到 </a-radio-button>
<a-radio-button :value="3"> 已作废 </a-radio-button>
<a-radio-button :value="4"> 已取消 </a-radio-button>
<a-radio-button :value="5"> 已结束 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.code" style="width: 200px" placeholder="预约编号"></a-input>
<a-select v-model="form.type" style="width: 200px" placeholder="预约类型">
<a-select-option :value="0">未反馈</a-select-option>
<a-select-option :value="1">反馈中</a-select-option>
<a-select-option :value="2">已反馈</a-select-option>
</a-select>
<a-select v-model="form.facilitiesCategoryId" style="width: 200px" placeholder="分类">
<a-select-option :value="0">差评</a-select-option>
<a-select-option :value="1">中评</a-select-option>
<a-select-option :value="2">好评</a-select-option>
</a-select>
<a-input v-model="form.name" style="width: 200px" placeholder="名称"></a-input>
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['创建时间开始','创建时间结束']"></a-range-picker>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange" :scroll="{ x: 2100 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="rate" slot-scope="text,record">
<a-rate :default-value="(record.score/2.0)" disabled allow-half></a-rate>
</template>
<template slot="action">
<!-- <span><a @click=detail(record)>详情</a></span>
<span><a style="margin-left: 8px" @click=reply(record)>回复</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span> -->
</template>
</a-table>
<!-- <div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div> -->
</div>
<a-drawer :title="activeTitle" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-descriptions style="padding: 16px" :column="1">
<a-descriptions-item label="类型">
{{adviceInfo.type==1?'咨询':2?'建议':3?'投诉':'表扬'}}
</a-descriptions-item>
<a-descriptions-item label="照片">
<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="反馈内容">
<a-table :columns="replyColumns" :data-source="adviceInfo.voUserAdviceDetailList" :pagination="false">
<template slot="create" slot-scope="text,row">
{{row.createName}}({{row.createUserType==1?'住户':'物业'}}) {{row.createDate}}
</template>
<template v-if="activeTitle=='回复'" slot="action" slot-scope="text,row">
<a @click="singelReply(row)"></a>
</template>
</a-table>
</a-descriptions-item>
<a-descriptions-item label="评分星级" v-if="activeTitle=='咨询详情'">
<a-rate :value="(adviceInfo.score*1)/2.0" disabled allow-half></a-rate>
</a-descriptions-item>
</a-descriptions>
<div v-if="activeTitle=='回复'">
<span>回复反馈</span>
<a-divider></a-divider>
<a-form-model :model="repForm" :rules="rules" style="padding: 16px" layout="inline">
<a-form-model-item label="反馈" prop="content">
<a-textarea v-model="repForm.content" :autoSize="{ minRows: 8}" placeholder="请输入回复反馈" style="width: 500px">
</a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="replyConfirm" type="primary" :style="{ marginRight: '8px' }"> 确认 </a-button>
<a-button @click="detailClose"> </a-button>
</div>
<a-modal :visible="singelReplyVisible" title="回复" @ok="singleConfirm" @cancel="singelReplyVisible=false">
<a-form-model-item label="回复">
<a-textarea v-model="singleForm.content" :autoSize="{ minRows: 4}" placeholder="请输入回复内容" style="width: 500px">
</a-textarea>
</a-form-model-item>
</a-modal>
</a-drawer>
</div>
</template>
<script>
import { getFacilitiesReserve } from "@/api/operation/facility"
import { columns,replyColumns } from "./depend/config";
export default {
data() {
return {
form: {
status: undefined,
code: '',
type: undefined,
facilitiesCategoryId: undefined,
name: '',
createDateStart: '',
createDateEnd: '',
},
repForm: {
appAdviceId: undefined,
content: '',
parentId: 0
},
singleForm: {
appAdviceId: undefined,
content: '',
parentId: 0
},
selTime: [],
rules: {
content: [{ required: true, message: "请输入回复", trigger: "blur" }],
},
activeName: 0,
columns: columns,
replyColumns: replyColumns,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
selectedRowKeys: [],
//
activeTitle: '',
detailShow: false,
adviceInfo: {voUserAdviceDetailList: []},
//
singelReplyVisible: false,
}
},
created() {
this.getData()
},
methods: {
getData() {
let obj = Object.assign( this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getFacilitiesReserve(obj).then(res => {
this.pagination.total = res.data.total;
this.tableData = res.data.rows
})
},
reset() {
this.form = {
status: undefined,
code: '',
type: undefined,
facilitiesCategoryId: undefined,
name: '',
createDateStart: '',
createDateEnd: '',
},
this.selTime = [];
this.getData();
},
handlerChange(val) {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
detailClose() {
this.adviceInfo = {};
this.repForm = {
appAdviceId: undefined,
content: '',
parentId: 0
},
this.detailShow = false
},
//
typeChange(val) {
this.getData();
},
//
handlerTime(val) {
this.form.createDateStart = val[0];
this.form.createDateEnd = val[1];
},
//
detail(val) {
this.activeTitle = '咨询详情'
adviceDetail({adviceId: val.id}).then(res => {
let data = res.data;
this.repForm.appAdviceId = data.id
this.adviceInfo = data
})
this.detailShow = true;
},
reply(val) {
this.activeTitle = '回复'
adviceDetail({adviceId: val.id}).then(res => {
let data = res.data;
this.repForm.appAdviceId = data.id
this.adviceInfo = data
})
this.detailShow = true;
},
replyConfirm() {
replyDetail(this.repForm).then(res => {
if (res.code === 200) {
this.$message.success(res.msg);
this.detailClose();
this.getData();
} else {
this.$message.error(res.msg);
}
})
},
singleConfirm() {
replyDetail(this.singleForm).then(res => {
if (res.code === 200) {
this.$message.success(res.msg);
this.singelReplyVisible = false;
this.singleForm = {
appAdviceId: undefined,
content: '',
parentId: 0
},
this.detailClose();
this.getData();
} else {
this.$message.error(res.msg);
}
})
},
singelReply(val) {
this.singleForm.appAdviceId = this.adviceInfo.id
this.singleForm.parentId = val.id
this.singelReplyVisible = true
},
del(val) {
if(val.status == 1 || val.status == 2) {
this.$confirm({
title: "该条信息您还未回复,是否删除?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
} else {
this.$confirm({
title: "是否确认删除该信息?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
selectionChoosed(val) {
this.selectedRowKeys = val
},
//
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的信息?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -1,66 +0,0 @@
export const form= {
type: 1,
name: '',
code: '',
createStartDate: undefined,
createEndDate: undefined,
}
export const addForm = {
name: '',
imgUrls: [],
}
export const columns = [
{
title: "分类编号",
width: "18%",
dataIndex: "code",
},
{
title: "分类名称",
width: "12%",
dataIndex: "name",
},
// {
// title: "分类类型",
// width: "9%",
// dataIndex: "type",
// },
{
title: "添加人名称",
width: "15%",
dataIndex: "createName",
},
{
title: "设施数量",
width: "12%",
dataIndex: "num",
},
{
title: "添加时间",
width: "16%",
dataIndex: "createDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "240",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
}
export function doStr(str, number) {
if(str.length >= number) {
return str.substr(0,number-1) + '...'
} else {
return str
}
}

@ -1,263 +0,0 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<!-- <span>{{form.type == 1?'设施管理':'设备管理'}}</span> -->
<a-radio-group
v-model="form.type"
button-style="solid"
@change="typeChange"
>
<a-radio-button :value="1"> 设施管理 </a-radio-button>
<a-radio-button :value="2"> 设备管理 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.name" style="width: 200px" :placeholder="form.type == 1 ?'设施分类名称':'设备分类名称'"></a-input>
<a-input v-model="form.code" style="width: 200px" :placeholder="form.type == 1 ?'设施编号':'设备编号'"></a-input>
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['添加开始时间','添加结束时间']"></a-range-picker>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">添加分类</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="action" slot-scope="text,record">
<span><a @click=edit(record)>编辑</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="form.type==1&&mode==1?'添加设施分类':form.type==2&&mode==1?'添加设备分类':form.type==1&&mode==2?'编辑设施分类':'编辑设备分类'"
:width="540" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="24">
<a-form-model-item label="设施名称" prop="name">
<a-input style="width: 300px" placeholder="请输入模版名称" v-model="addForm.name"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设施图片">
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="detailClose"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import {getFacilitiesList,addFacility,updateFacility,delFacility,findFacility} from "@/api/operation/facility"
import { form ,addForm, rules, columns } from "./depend/config";
export default {
data() {
return {
form:form,
columns: columns,
rules: rules,
tableData: [],
selTime: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
selectedRowKeys: [],
//
addForm: addForm,
detailShow: false,
mode: 1,
activeId: undefined,
fileList: [],
}
},
created() {
this.getData()
},
methods: {
getData() {
let obj = Object.assign(this.form, {pageNum:this.pagination.current,size:this.pagination.pageSize})
getFacilitiesList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form.name = ''
this.form.code = ''
this.form.createStartDate = undefined
this.form.createEndDate = undefined
this.selTime = []
this.getData()
},
handlerTime(val) {
this.form.createStartDate = val[0];
this.form.createEndDate = val[1];
},
typeChange() {
this.getData()
},
handlerChange() {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的分类?",
icon:'delete',
onOk:async()=>{
let res = await delFacility({facilitiesCategoryIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
del(val) {
this.$confirm({
title: "是否删除该分类?",
icon:'delete',
onOk:async()=>{
let res = await delFacility({facilitiesCategoryIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
edit(val) {
this.mode = 2;
findFacility({facilitiesCategoryId: val.id}).then(res => {
let data = res.data;
this.addForm.name = data.name;
if(data.imgList.length>0){
const pic = []
this.addForm.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
this.activeId = data.id
})
this.detailShow = true;
},
addConfirm() {
if(this.mode == 1) {
let obj = Object.assign(this.addForm,{type: this.form.type})
addFacility(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else if (this.mode == 2) {
let obj = Object.assign(this.addForm,{id: this.activeId})
updateFacility(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
detailClose() {
this.addForm = {
name: '',
imgUrls: [],
};
this.fileList = [];
this.detailShow = false;
},
//
handleChange(data) {
this.fileList = data;
this.addForm.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.addForm.imgUrls.push(ele.response.data)
}
})
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
</style>

@ -1,13 +0,0 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -72,6 +72,7 @@ export default {
this.selectedRowKeys = data;
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -206,6 +206,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await planUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -108,14 +108,17 @@ export default {
this.getData()
},
changeTime(data, start, end) {
console.log(start);
this.searchForm[start] = data[0];
this.searchForm[end] = data[1];
console.log(this.searchForm);
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -145,11 +148,13 @@ export default {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -109,6 +109,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await pointUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -118,6 +118,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -154,11 +155,13 @@ export default {
});
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -106,6 +106,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await routeUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -100,6 +100,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -129,11 +130,13 @@ export default {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -80,6 +80,7 @@ export default {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await newsItemUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -101,6 +101,7 @@ export default {
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
@ -123,12 +124,14 @@ export default {
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -74,6 +74,7 @@ export default {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -3,7 +3,7 @@ export const form = {
title:undefined,
categoryId:undefined,
status:undefined,
content:'',
content:undefined,
imgUrls:[]
}
export const rules = {

@ -62,13 +62,10 @@
<a-form-model-item prop="content" label="内容">
<a-textarea
v-model="form.content"
placeholder="请输入内容不超过1024字"
placeholder="请输入内容"
style="width: 80%"
:autosize="{minRows: 10}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
</a-col>
<a-col :span="24">

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save