|
@@ -29,8 +29,8 @@
|
|
|
:data="mixins_list"
|
|
|
:pageset="mixins_pageset"
|
|
|
@page-change="pageChange"
|
|
|
+ :loading="mixins_onQuery"
|
|
|
>
|
|
|
- <!-- :loading="mixins_onQuery" -->
|
|
|
<template slot-scope="scope" slot="releaseTime">
|
|
|
<div>
|
|
|
{{ scope.row.pubDate }}
|
|
@@ -257,7 +257,7 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- <previe-inform :dataDetail="rowDetail"></previe-inform>
|
|
|
+ <previe-inform :dataDetail="rowDetail" :filePath="filePath"></previe-inform>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -273,10 +273,14 @@
|
|
|
<GeminiScrollbar class="my-scroll-bar" :autoshow="false" :color="red">
|
|
|
<div class="dialog-right-content">
|
|
|
<div class="dialog-title">
|
|
|
- <div class="dialog-titles">{{ ruleForm.title ? ruleForm.title : '标题' }}</div>
|
|
|
+ <div class="dialog-titles" v-if="rowDetail">
|
|
|
+ {{ rowDetail.title ? rowDetail.title : '标题' }}
|
|
|
+ </div>
|
|
|
+ <div class="dialog-titles" v-else>{{ ruleForm.title ? ruleForm.title : '标题' }}</div>
|
|
|
<div class="dialog-urgency" v-if="ruleForm.exigencyText">紧急</div>
|
|
|
</div>
|
|
|
- <div class="dialog-right-time">{{ new Date() | filterTime }}</div>
|
|
|
+ <div class="dialog-right-time" v-if="rowDetail">{{ rowDetail.pubDate }}</div>
|
|
|
+ <div class="dialog-right-time" v-else>{{ new Date() | filterTime }}</div>
|
|
|
<div></div>
|
|
|
<div class="content">
|
|
|
<div class="content-text">
|
|
@@ -285,14 +289,23 @@
|
|
|
<!-- <div><img style="width: 100px; height: 100px" :src="imageUrl" alt="" /></div> -->
|
|
|
<div class="content-inform">
|
|
|
<div>{{ !showDetail ? rowDetail.communityName : popCommunityName }}</div>
|
|
|
- <div>{{ new Date() | filterTime }}</div>
|
|
|
+ <div v-if="rowDetail">{{ rowDetail.pubDate }}</div>
|
|
|
+ <div v-else>{{ new Date() | filterTime }}</div>
|
|
|
<div>物业电话:{{ $store.state.cruUserInfo.phone }}</div>
|
|
|
</div>
|
|
|
- <div v-if="fileList">
|
|
|
- <div class="file-name" v-for="(item, index) of fileList" :key="index">
|
|
|
+ <div v-if="!rowDetail">
|
|
|
+ <div class="file-name" v-for="(item, index) of uploadFileUrl" :key="index">
|
|
|
+ <span class="file-name-left"><i class="el-icon-paperclip"></i> </span>
|
|
|
+ <span class="file-name-right">
|
|
|
+ {{ item.name }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div class="file-name" v-for="(item, index) of filePath" :key="index">
|
|
|
<span class="file-name-left"><i class="el-icon-paperclip"></i> </span>
|
|
|
<span class="file-name-right">
|
|
|
- {{ item }}
|
|
|
+ {{ item.name }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -332,7 +345,6 @@ export default {
|
|
|
showImageUrlTwo: false,
|
|
|
showUploadImageText: true,
|
|
|
dialogImageUrl: '',
|
|
|
- dialogVisible: false,
|
|
|
disabled: false,
|
|
|
// 显示详情
|
|
|
showDetail: true,
|
|
@@ -473,7 +485,9 @@ export default {
|
|
|
// 选中的人员
|
|
|
selectDataPeopleTreeData: [],
|
|
|
// 文件上传地址
|
|
|
- uploadFileUrl: []
|
|
|
+ uploadFileUrl: [],
|
|
|
+ // 远文件名
|
|
|
+ oldFileName: ''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -487,7 +501,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
language() {
|
|
|
- return this.languageTypeList['en'];
|
|
|
+ return this.languageTypeList['zh_CN'];
|
|
|
}
|
|
|
},
|
|
|
mounted() {},
|
|
@@ -528,10 +542,16 @@ export default {
|
|
|
handlePreview(file) {
|
|
|
console.log('点击文件', file);
|
|
|
},
|
|
|
- successFile(file, fileList) {
|
|
|
- this.fileList.push(fileList.name);
|
|
|
- this.uploadFileUrl.push(fileList.response.data);
|
|
|
- console.log('上传文件successFile', this.uploadFileUrl);
|
|
|
+ successFile(file, fileLists) {
|
|
|
+ let obj = {};
|
|
|
+ // this.fileList.push(fileLists.name);
|
|
|
+ let resName = fileLists.response.data;
|
|
|
+ obj.oldName = resName;
|
|
|
+ obj.name = fileLists.name;
|
|
|
+ // this.uploadFileUrl= this.uploadFileUrl.concat(newName + ',');
|
|
|
+ this.uploadFileUrl.push(obj);
|
|
|
+
|
|
|
+ console.log('上传文件successFile', this.fileList);
|
|
|
},
|
|
|
handleExceed(files, fileList) {
|
|
|
this.$message.warning(
|
|
@@ -540,13 +560,10 @@ export default {
|
|
|
},
|
|
|
beforeRemove(file, fileList) {
|
|
|
let removeName = this.fileList.filter((item) => {
|
|
|
- return item != file.name;
|
|
|
- });
|
|
|
- let removeUrl = this.fileList.filter((item) => {
|
|
|
- return item != file.name;
|
|
|
+ return item.name != file.name;
|
|
|
});
|
|
|
this.fileList = removeName;
|
|
|
- this.uploadFileUrl = removeUrl;
|
|
|
+ this.uploadFileUrl = removeName;
|
|
|
console.log('点击一处', this.fileList);
|
|
|
},
|
|
|
|
|
@@ -591,7 +608,6 @@ export default {
|
|
|
},
|
|
|
handlePictureCardPreview(file) {
|
|
|
this.dialogImageUrl = file.url;
|
|
|
- this.dialogVisible = true;
|
|
|
},
|
|
|
handleDownload(file) {
|
|
|
console.log(file);
|
|
@@ -605,10 +621,47 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ getSelect(data) {
|
|
|
+ var str = [];
|
|
|
+ const getStr = function (list) {
|
|
|
+ list.forEach(function (row) {
|
|
|
+ if (row.children) {
|
|
|
+ getStr(row.children);
|
|
|
+ } else {
|
|
|
+ if (row.type !== 'unit') {
|
|
|
+ str.push(row.value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+ getStr(data);
|
|
|
+ return str;
|
|
|
+ console.log('getStr', str);
|
|
|
+ },
|
|
|
+ dimension(arr) {
|
|
|
+ var arrs = [];
|
|
|
+ arr.map((item, index) => {
|
|
|
+ if (!!item.children & (item.type !== 'unit')) {
|
|
|
+ this.dimension(item.children);
|
|
|
+ } else {
|
|
|
+ if (item.name.indexOf('单元') === -1 && item.type !== 'unit') {
|
|
|
+ arrs.push(item.value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 选中的房间
|
|
|
selectDataHouseTree(val) {
|
|
|
- this.selectDataHouseTreeData = val;
|
|
|
- console.log('选中的房间', val);
|
|
|
+ // this.selectDataHouseTreeData = val;
|
|
|
+ // 获取房间下的usid
|
|
|
+ this.$http.post('/sc-community-web/notice/queryHouseUser', val).then((res) => {
|
|
|
+ if (res.status === 0) {
|
|
|
+ this.selectDataHouseTreeData = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message('获取房间失败!请重试');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log('选中的房间val', val);
|
|
|
},
|
|
|
// 选择的人员
|
|
|
selectPeople(val) {
|
|
@@ -716,23 +769,11 @@ export default {
|
|
|
* @return {void}
|
|
|
* */
|
|
|
dialogButton(type) {
|
|
|
- // 获取发布到的userid
|
|
|
- // this.$http.get('/sc-community-web/notice/queryHouseUser', this.selectDataHouseTreeData).then((res) => console.log('uid', res));
|
|
|
- console.log('点击发布', this.selectStaff);
|
|
|
- console.log('点击发布===========', this.ruleForm);
|
|
|
// console.log('获取富文本内容', this.html);
|
|
|
if (type === 'prev') {
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
// this.showDetail = false;
|
|
|
-
|
|
|
- let detaH = this.$moment(new Date()).format('HH');
|
|
|
- let detaM = this.$moment(new Date()).format('mm');
|
|
|
- let detaS = this.$moment(new Date()).format('ss');
|
|
|
- let d = detaH + ':' + detaM + ':' + detaS;
|
|
|
- // let startTime = `${this.ruleForm.activeTime[0]}T${d}`;
|
|
|
- // let endTime = `${this.ruleForm.activeTime[1]}T${d}`;
|
|
|
- console.log('startTime', this.ruleForm.activeTime);
|
|
|
let startTime = this.$moment(this.ruleForm.activeTime[0]).format(`YYYY-MM-DDTHH:mm:ss`);
|
|
|
let endTime = this.$moment(this.ruleForm.activeTime[1]).format(`YYYY-MM-DDTHH:mm:ss`);
|
|
|
let query = {
|
|
@@ -746,7 +787,7 @@ export default {
|
|
|
// pubPeople:ruleForm.informType,
|
|
|
// pubStatus: "",
|
|
|
// themePictrue: '',
|
|
|
- userId: [1, 2, 3],
|
|
|
+ userId: this.ruleForm.issueRoom.checkAll ? this.selectDataHouseTreeData : this.selectDataPeopleTreeData,
|
|
|
title: this.ruleForm.title,
|
|
|
type: this.ruleForm.informType,
|
|
|
urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0,
|
|
@@ -754,6 +795,14 @@ export default {
|
|
|
this.ruleForm.issueRoom.radioStaff == '全部员工' || this.ruleForm.issueRoom.radioStaff == '指定员工' ? 1 : 0
|
|
|
};
|
|
|
this.$http.post('/sc-community-web/notice/add', query).then((res) => {
|
|
|
+ if (res.status === 0) {
|
|
|
+ this.$message.success('发布成功');
|
|
|
+ this.mixins_search();
|
|
|
+ } else {
|
|
|
+ this.$message('发布失败,请重试');
|
|
|
+ }
|
|
|
+ this.centerDialogVisible = false;
|
|
|
+
|
|
|
console.log('点击发布', res);
|
|
|
});
|
|
|
} else {
|
|
@@ -784,11 +833,15 @@ export default {
|
|
|
},
|
|
|
/** 查看详情*/
|
|
|
clickDatail(row) {
|
|
|
+ this.rowDetail = [];
|
|
|
console.log('查看详情', row);
|
|
|
this.centerDialogVisible = true;
|
|
|
this.showDetail = false;
|
|
|
this.$http.get('/sc-community-web/notice/find/' + row.id).then((res) => {
|
|
|
this.rowDetail = row;
|
|
|
+ // let fileArr = row.filePath.split(',');
|
|
|
+ // this.filePath = fileArr.slice(0, fileArr.length - 1);
|
|
|
+
|
|
|
console.log('查看详情', res);
|
|
|
});
|
|
|
// this.ruleForm.title = row.managementName;
|