|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
<div class="inform">
|
|
|
<div class="search">
|
|
|
- <el-input placeholder="请输入标题" class="search-input" clearable v-model="mixins_query.location"></el-input>
|
|
|
+ <el-input placeholder="请输入标题" class="search-input" clearable v-model="mixins_query.title"></el-input>
|
|
|
<el-select placeholder="请选择所属社区" v-model="mixins_query.communityId" clearable>
|
|
|
<el-option v-for="(item, index) in communityList" :key="index" :label="item.label" :value="item.id"></el-option>
|
|
|
- <!-- <el-option v-for="(item, index) in communityList" :key="index" :label="item.label" :value="item.regionId"></el-option> -->
|
|
|
</el-select>
|
|
|
<el-date-picker
|
|
|
v-model="searchTime"
|
|
@@ -26,7 +25,7 @@
|
|
|
<div class="roles-wrap">
|
|
|
<zz-table
|
|
|
:cols="cols"
|
|
|
- :settings="{ showNumber: true, stripe: true, showNumberWidth: '120' }"
|
|
|
+ :settings="{ showNumber: true, stripe: true, showNumberWidth: '100' }"
|
|
|
:data="mixins_list"
|
|
|
:pageset="mixins_pageset"
|
|
|
@page-change="pageChange"
|
|
@@ -46,7 +45,7 @@
|
|
|
</div>
|
|
|
<!-- 添加弹框 -->
|
|
|
<div class="dialog-info">
|
|
|
- <el-dialog :visible.sync="centerDialogVisible" width="986px" :close-on-click-modal="false">
|
|
|
+ <el-dialog :visible.sync="centerDialogVisible" width="1086px" :close-on-click-modal="false">
|
|
|
<div class="dialog">
|
|
|
<div class="dialog-header">
|
|
|
<i class="el-dialog__close el-icon el-icon-close" @click="dialogButton('clear')"></i>
|
|
@@ -68,6 +67,7 @@
|
|
|
v-model="ruleForm.popCommunityId"
|
|
|
clearable
|
|
|
class="dialog-select"
|
|
|
+ @change="changeCommunity"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in communityList"
|
|
@@ -84,33 +84,28 @@
|
|
|
label="社区住户"
|
|
|
name="type"
|
|
|
v-model="ruleForm.issueRoom.checkAll"
|
|
|
+ @change="changeCheckboxRoom"
|
|
|
></el-checkbox>
|
|
|
- <el-radio-group v-model="ruleForm.issueRoom.radioRoom" @change="changeRadioRoom">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="ruleForm.issueRoom.radioRoom"
|
|
|
+ :disabled="!ruleForm.issueRoom.checkAll"
|
|
|
+ @change="changeRadioRoom"
|
|
|
+ >
|
|
|
<el-radio label="全部房间"></el-radio>
|
|
|
<el-radio label="指定房间"></el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
- <div class="selet-room">
|
|
|
- <!-- <building-tree
|
|
|
+ <div class="selet-room" v-show="ruleForm.issueRoom.checkAll">
|
|
|
+ <building-tree
|
|
|
@buildingInformation="buildingInformation"
|
|
|
:buildingType="1"
|
|
|
- v-if="!showaddDialog"
|
|
|
- ></building-tree> -->
|
|
|
-
|
|
|
- <el-select
|
|
|
- multiple
|
|
|
- v-model="selectRoom"
|
|
|
- collapse-tags
|
|
|
- :disabled="!ruleForm.disabledRoom"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in optionsRoom"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ :showCheckboxTree="true"
|
|
|
+ :defaultExpandAllTree="false"
|
|
|
+ :accordion="true"
|
|
|
+ :selectAll="true"
|
|
|
+ @selectData="selectDataHouseTree"
|
|
|
+ ref="selectTreeHouse"
|
|
|
+ ></building-tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="issueRoom">
|
|
@@ -121,21 +116,28 @@
|
|
|
v-model="ruleForm.issueRoom.staff"
|
|
|
@change="changeCheckboxStaffRoom"
|
|
|
></el-checkbox>
|
|
|
- <el-radio-group v-model="ruleForm.issueRoom.radioStaff" @change="changeRadioStaffRoom">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="ruleForm.issueRoom.radioStaff"
|
|
|
+ :disabled="!ruleForm.issueRoom.staff"
|
|
|
+ @change="changeRadioStaffRoom"
|
|
|
+ >
|
|
|
<el-radio label="全部员工"></el-radio>
|
|
|
<el-radio label="指定员工"></el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
- <div class="selet-room">
|
|
|
- <el-select multiple v-model="selectStaff" :disabled="!ruleForm.disabledStaffRoom">
|
|
|
- <el-option
|
|
|
- v-for="item in optionsStaff"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <div class="selet-room" v-show="ruleForm.issueRoom.staff">
|
|
|
+ <!-- @buildingInformation="buildingInformation" -->
|
|
|
+ <building-tree
|
|
|
+ ref="selectTreePeoples"
|
|
|
+ :buildingType="1"
|
|
|
+ :showCheckboxTree="true"
|
|
|
+ :defaultExpandAllTree="false"
|
|
|
+ :showHouseTree="false"
|
|
|
+ :accordionPeople="true"
|
|
|
+ :selectAll="true"
|
|
|
+ @dataPeople="dataPeople"
|
|
|
+ @selectPeople="selectPeople"
|
|
|
+ ></building-tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -145,6 +147,7 @@
|
|
|
@change="changeInformType"
|
|
|
clearable
|
|
|
class="dialog-select"
|
|
|
+ placeholder="请选择通知类型"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in informTypes"
|
|
@@ -164,11 +167,10 @@
|
|
|
<el-radio label="否"></el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="请选择时间" prop="activeTime">
|
|
|
+ <el-form-item label="选择时间" prop="activeTime">
|
|
|
<el-date-picker
|
|
|
v-model="ruleForm.activeTime"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- type="daterange"
|
|
|
+ type="datetimerange"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
@@ -176,7 +178,7 @@
|
|
|
:editable="false"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="主题图片" prop="image" v-if="showUploadImage">
|
|
|
+ <!-- <el-form-item label="主题图片" prop="image" v-if="showUploadImage">
|
|
|
<div>
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
@@ -209,17 +211,18 @@
|
|
|
>
|
|
|
</span>
|
|
|
</div></el-form-item
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-form-item label="通知内容" prop="informContent">
|
|
|
<!-- tui-editor 富文本编辑器 -->
|
|
|
<div class="editor-container">
|
|
|
- <markdown-editor
|
|
|
+ <!-- <markdown-editor
|
|
|
ref="markdownEditor"
|
|
|
v-model="markdownEditorContent"
|
|
|
:language="language"
|
|
|
height="180px"
|
|
|
width="543"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+ <tinymce v-model="editorContent" :height="140" :width="510" />
|
|
|
</div>
|
|
|
<!-- <el-button type="primary" icon="el-icon-document" @click="getHtml"> 预览 </el-button> -->
|
|
|
</el-form-item>
|
|
@@ -235,6 +238,7 @@
|
|
|
:limit="3"
|
|
|
:on-exceed="handleExceed"
|
|
|
:file-list="fileList"
|
|
|
+ :on-success="successFile"
|
|
|
>
|
|
|
<el-button size="small" icon="el-icon-paperclip">选择附件</el-button>
|
|
|
<div slot="tip" class="el-upload-text">
|
|
@@ -243,6 +247,7 @@
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item class="dialog-footer">
|
|
|
<span>
|
|
|
<el-button type="primary" @click="dialogButton('clear')" plain>取消</el-button>
|
|
@@ -275,13 +280,21 @@
|
|
|
<div></div>
|
|
|
<div class="content">
|
|
|
<div class="content-text">
|
|
|
- <div v-html="html" id="content" />
|
|
|
+ <div v-html="editorContent" id="content" />
|
|
|
</div>
|
|
|
<!-- <div><img style="width: 100px; height: 100px" :src="imageUrl" alt="" /></div> -->
|
|
|
<div class="content-inform">
|
|
|
- <div>滨江华府物业管理公司</div>
|
|
|
- <div>2021-11-11</div>
|
|
|
- <div>物业电话:010-12345678</div>
|
|
|
+ <div>{{ !showDetail ? rowDetail.communityName : popCommunityName }}</div>
|
|
|
+ <div>{{ 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">
|
|
|
+ <span class="file-name-left"><i class="el-icon-paperclip"></i> </span>
|
|
|
+ <span class="file-name-right">
|
|
|
+ {{ item }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div></div>
|
|
@@ -299,16 +312,18 @@
|
|
|
<script>
|
|
|
import list from '@utils/list.js';
|
|
|
import previeInform from './common/previeInform';
|
|
|
-// tuieditor富文本编辑器
|
|
|
-import MarkdownEditor from '@/components/MarkdownEditor';
|
|
|
+// Tinymce 富文本编辑器
|
|
|
+import Tinymce from '@/components/Tinymce';
|
|
|
const content = `您好!为了给大家提供一个舒适、卫生的生活环境,进一步有效控制小区“四害”孳生,减少四害对大家生活影响,管理处计划12月份安排小区公共区域集中消杀4次。`;
|
|
|
export default {
|
|
|
mixins: [list],
|
|
|
- components: { previeInform, MarkdownEditor },
|
|
|
+ components: { previeInform, Tinymce },
|
|
|
data() {
|
|
|
let _this = this;
|
|
|
return {
|
|
|
+ popCommunityName: '',
|
|
|
// 文件上传
|
|
|
+ uploadImageUrl: '/sc-community-web/upload/uploadFile',
|
|
|
fileList: [],
|
|
|
// 显示图片上传
|
|
|
imageUrl: '',
|
|
@@ -323,7 +338,7 @@ export default {
|
|
|
showDetail: true,
|
|
|
rowDetail: '',
|
|
|
// 富文本编辑器
|
|
|
- markdownEditorContent: content,
|
|
|
+ editorContent: content,
|
|
|
html: content,
|
|
|
languageTypeList: {
|
|
|
en: 'en_US',
|
|
@@ -333,17 +348,7 @@ export default {
|
|
|
// 查询的时间
|
|
|
searchTime: [],
|
|
|
// 选择的房间
|
|
|
- selectRoom: [],
|
|
|
- optionsRoom: [
|
|
|
- {
|
|
|
- value: '选项1',
|
|
|
- label: '滨江华府-A栋-10单元-1001,滨江华府-A栋-10单元-1002'
|
|
|
- },
|
|
|
- {
|
|
|
- value: '选项2',
|
|
|
- label: '滨江华府-A栋-10单元-1002'
|
|
|
- }
|
|
|
- ],
|
|
|
+ optionsRoom: [],
|
|
|
// 选择的员工
|
|
|
selectStaff: [],
|
|
|
optionsStaff: [
|
|
@@ -368,7 +373,7 @@ export default {
|
|
|
},
|
|
|
disabledRoom: false, //单选框是否禁用
|
|
|
disabledStaffRoom: false,
|
|
|
- informType: '物业通知', //通知类型
|
|
|
+ informType: '', //通知类型
|
|
|
title: '', //标题
|
|
|
exigencyOr: '是', //是否紧急
|
|
|
exigencyText: true,
|
|
@@ -390,29 +395,26 @@ export default {
|
|
|
// 通知类型
|
|
|
informTypes: [
|
|
|
{
|
|
|
- status: 1,
|
|
|
+ status: 0,
|
|
|
label: '物业通知'
|
|
|
},
|
|
|
{
|
|
|
- status: 2,
|
|
|
+ status: 1,
|
|
|
label: '社区活动'
|
|
|
}
|
|
|
],
|
|
|
cols: [
|
|
|
{
|
|
|
label: '标题',
|
|
|
- prop: 'title',
|
|
|
- width: 200
|
|
|
+ prop: 'title'
|
|
|
},
|
|
|
{
|
|
|
label: '所属社区',
|
|
|
- prop: 'communityName',
|
|
|
- width: 200
|
|
|
+ prop: 'communityName'
|
|
|
},
|
|
|
{
|
|
|
label: '通知类型',
|
|
|
prop: 'type',
|
|
|
- width: 200,
|
|
|
format(val) {
|
|
|
if (val == 0) {
|
|
|
return '物业通知';
|
|
@@ -426,7 +428,6 @@ export default {
|
|
|
{
|
|
|
label: '是否紧急',
|
|
|
prop: 'urgentFlag',
|
|
|
- width: 210,
|
|
|
format(val) {
|
|
|
if (val == 0) {
|
|
|
return '不紧急';
|
|
@@ -440,21 +441,18 @@ export default {
|
|
|
{
|
|
|
label: '发布时间',
|
|
|
prop: 'pubDate',
|
|
|
- width: 240,
|
|
|
slot: 'releaseTime'
|
|
|
},
|
|
|
{
|
|
|
label: '状态',
|
|
|
prop: 'status',
|
|
|
- width: 190,
|
|
|
format(val) {
|
|
|
return val ? val : '已发布';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
label: '发布人',
|
|
|
- prop: 'pubPeople',
|
|
|
- width: 210
|
|
|
+ prop: 'pubPeople'
|
|
|
},
|
|
|
{
|
|
|
label: '操作',
|
|
@@ -466,8 +464,16 @@ export default {
|
|
|
// 显隐弹框
|
|
|
centerDialogVisible: false,
|
|
|
// 保存上传的文本
|
|
|
- newConten: ''
|
|
|
+ newConten: '',
|
|
|
// 获取的房间信息
|
|
|
+ houseData: [],
|
|
|
+ peopleData: [],
|
|
|
+ // 选中的房间
|
|
|
+ selectDataHouseTreeData: [],
|
|
|
+ // 选中的人员
|
|
|
+ selectDataPeopleTreeData: [],
|
|
|
+ // 文件上传地址
|
|
|
+ uploadFileUrl: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -478,12 +484,6 @@ export default {
|
|
|
this.mixins_dataUrl = '/sc-community-web/notice/page';
|
|
|
this.mixins_query = {};
|
|
|
this.mixins_search();
|
|
|
- // 获取房间
|
|
|
- let query = { buildingType: 1 };
|
|
|
- this.$http.get('/sc-community/assets/tree/community/find', query).then((res) => {
|
|
|
- this.optionsRoom = res.data;
|
|
|
- console.log('获取房间', res);
|
|
|
- });
|
|
|
},
|
|
|
computed: {
|
|
|
language() {
|
|
@@ -495,21 +495,22 @@ export default {
|
|
|
html(newv, oldv) {
|
|
|
console.log('watch', newv, oldv);
|
|
|
},
|
|
|
- markdownEditorContent(newv, oldv) {
|
|
|
- this.ruleForm.informContent = newv;
|
|
|
- // if (newv != oldv) {
|
|
|
- // this.html = newv;
|
|
|
- // }
|
|
|
- console.log('watch markdownEditorContent', newv, oldv);
|
|
|
- this.html = this.$refs.markdownEditor.getHtml();
|
|
|
- },
|
|
|
newConten(newv, oldv) {
|
|
|
console.log('newConten', newv, oldv);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 人员树
|
|
|
+ dataPeople(data) {
|
|
|
+ this.peopleData = data;
|
|
|
+ console.log('====================================');
|
|
|
+ console.log('人员', data);
|
|
|
+ console.log('====================================');
|
|
|
+ },
|
|
|
// 房间树
|
|
|
buildingInformation(data) {
|
|
|
+ this.houseData = data;
|
|
|
+ console.log('buildingInformation', data);
|
|
|
if (!!data.type && data.type == 'community') {
|
|
|
this.mixins_query = { communityId: data.value, buildingType: 1 };
|
|
|
} else {
|
|
@@ -522,10 +523,15 @@ export default {
|
|
|
},
|
|
|
// 上传文件
|
|
|
handleRemove(file, fileList) {
|
|
|
- console.log(file, fileList);
|
|
|
+ console.log('上传文件', file, fileList);
|
|
|
},
|
|
|
handlePreview(file) {
|
|
|
- console.log(file);
|
|
|
+ console.log('点击文件', file);
|
|
|
+ },
|
|
|
+ successFile(file, fileList) {
|
|
|
+ this.fileList.push(fileList.name);
|
|
|
+ this.uploadFileUrl.push(fileList.response.data);
|
|
|
+ console.log('上传文件successFile', this.uploadFileUrl);
|
|
|
},
|
|
|
handleExceed(files, fileList) {
|
|
|
this.$message.warning(
|
|
@@ -533,14 +539,23 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
beforeRemove(file, fileList) {
|
|
|
- return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
+ let removeName = this.fileList.filter((item) => {
|
|
|
+ return item != file.name;
|
|
|
+ });
|
|
|
+ let removeUrl = this.fileList.filter((item) => {
|
|
|
+ return item != file.name;
|
|
|
+ });
|
|
|
+ this.fileList = removeName;
|
|
|
+ this.uploadFileUrl = removeUrl;
|
|
|
+ console.log('点击一处', this.fileList);
|
|
|
},
|
|
|
+
|
|
|
/**上传图片*/
|
|
|
clickUploadImage() {
|
|
|
this.showImageUrlTwo = true;
|
|
|
this.showUploadImageText = false;
|
|
|
this.html = this.$refs.markdownEditor.getHtml();
|
|
|
- console.log('富文本内容', this.markdownEditorContent);
|
|
|
+ console.log('富文本内容', this.editorContent);
|
|
|
},
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
// this.imageUrl = URL.createObjectURL(file.raw);
|
|
@@ -581,28 +596,69 @@ export default {
|
|
|
handleDownload(file) {
|
|
|
console.log(file);
|
|
|
},
|
|
|
- /**监听单选框变化*/
|
|
|
+ // 下拉框的变化
|
|
|
+ changeCommunity(val) {
|
|
|
+ for (let index = 0; index < this.communityList.length; index++) {
|
|
|
+ const element = this.communityList[index];
|
|
|
+ if (element.id == val) {
|
|
|
+ return (this.popCommunityName = element.label);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 选中的房间
|
|
|
+ selectDataHouseTree(val) {
|
|
|
+ this.selectDataHouseTreeData = val;
|
|
|
+ console.log('选中的房间', val);
|
|
|
+ },
|
|
|
+ // 选择的人员
|
|
|
+ selectPeople(val) {
|
|
|
+ this.selectDataPeopleTreeData = val;
|
|
|
+ console.log('选择的人员', val);
|
|
|
+ },
|
|
|
+ /**监听指定房间单选框变化*/
|
|
|
changeRadioRoom(val) {
|
|
|
+ this.showChangeRoom = false;
|
|
|
if (val == '指定房间') {
|
|
|
this.ruleForm.disabledRoom = true;
|
|
|
+ this.$refs.selectTreeHouse.selectHouseOr();
|
|
|
} else {
|
|
|
this.ruleForm.disabledRoom = false;
|
|
|
+ this.$refs.selectTreeHouse.selectAllHouse();
|
|
|
}
|
|
|
console.log('监听房间单选框变化', val);
|
|
|
},
|
|
|
- // 监听复选框变化
|
|
|
+ //选择员工复选框变化
|
|
|
changeCheckboxStaffRoom(val) {
|
|
|
console.log('监听复选框变化', val);
|
|
|
if (val) {
|
|
|
this.ruleForm.issueRoom.radioStaff = '全部员工';
|
|
|
+ this.ruleForm.issueRoom.checkAll = false;
|
|
|
+ this.ruleForm.issueRoom.radioRoom = '';
|
|
|
+ this.$refs.selectTreePeoples.selectAllPeople();
|
|
|
+ } else {
|
|
|
+ this.ruleForm.issueRoom.radioStaff = '';
|
|
|
+ this.ruleForm.issueRoom.checkAll = true;
|
|
|
+ this.ruleForm.issueRoom.radioRoom = '全部房间';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 选择房间复选框变化
|
|
|
+ changeCheckboxRoom(val) {
|
|
|
+ if (val) {
|
|
|
+ this.$refs.selectTreeHouse.selectAllHouse();
|
|
|
+ this.ruleForm.issueRoom.staff = false;
|
|
|
+ this.ruleForm.issueRoom.checkAll = true;
|
|
|
+ this.ruleForm.issueRoom.radioRoom = '全部房间';
|
|
|
+ this.ruleForm.issueRoom.radioStaff = '';
|
|
|
}
|
|
|
},
|
|
|
// 指定员工
|
|
|
changeRadioStaffRoom(val) {
|
|
|
if (val == '指定员工') {
|
|
|
this.ruleForm.disabledStaffRoom = true;
|
|
|
+ this.$refs.selectTreePeoples.selectPeopleOr();
|
|
|
} else {
|
|
|
this.ruleForm.disabledStaffRoom = false;
|
|
|
+ this.$refs.selectTreePeoples.selectAllPeople();
|
|
|
}
|
|
|
console.log('监听员工单选框变化', val, this.ruleForm.issueRoom.staff);
|
|
|
},
|
|
@@ -616,8 +672,10 @@ export default {
|
|
|
},
|
|
|
// 发布活动类型
|
|
|
changeInformType(val) {
|
|
|
- if (val == 2) {
|
|
|
+ if (val == 0) {
|
|
|
this.showUploadImage = true;
|
|
|
+ } else {
|
|
|
+ this.showUploadImage = false;
|
|
|
}
|
|
|
console.log('发布活动类型', val);
|
|
|
},
|
|
@@ -658,37 +716,42 @@ 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.popCommunityId);
|
|
|
+ console.log('点击发布===========', this.ruleForm);
|
|
|
// console.log('获取富文本内容', this.html);
|
|
|
if (type === 'prev') {
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.showDetail = false;
|
|
|
+ // 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}`;
|
|
|
-
|
|
|
+ // 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 = {
|
|
|
communityId: this.ruleForm.popCommunityId,
|
|
|
- content: this.html,
|
|
|
+ content: this.editorContent,
|
|
|
+ startTime: startTime,
|
|
|
endTime: endTime,
|
|
|
- // filePath": "",
|
|
|
+ filePath: this.uploadFileUrl,
|
|
|
id: 1,
|
|
|
pubDate: this.$moment(new Date()).format(`YYYY-MM-DDTHH:mm:ss`),
|
|
|
// pubPeople:ruleForm.informType,
|
|
|
// pubStatus: "",
|
|
|
- startTime: startTime,
|
|
|
// themePictrue: '',
|
|
|
userId: [1, 2, 3],
|
|
|
title: this.ruleForm.title,
|
|
|
- type: this.ruleForm.informType === '物业通知' ? 0 : 1,
|
|
|
- urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0
|
|
|
- // userId: [],
|
|
|
- // userType: 0
|
|
|
+ type: this.ruleForm.informType,
|
|
|
+ urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0,
|
|
|
+ userType:
|
|
|
+ this.ruleForm.issueRoom.radioStaff == '全部员工' || this.ruleForm.issueRoom.radioStaff == '指定员工' ? 1 : 0
|
|
|
};
|
|
|
this.$http.post('/sc-community-web/notice/add', query).then((res) => {
|
|
|
console.log('点击发布', res);
|
|
@@ -724,9 +787,12 @@ export default {
|
|
|
console.log('查看详情', row);
|
|
|
this.centerDialogVisible = true;
|
|
|
this.showDetail = false;
|
|
|
- this.ruleForm.title = row.managementName;
|
|
|
- this.ruleForm.newPhone = row.phone;
|
|
|
- this.rowDetail = row;
|
|
|
+ this.$http.get('/sc-community-web/notice/find/' + row.id).then((res) => {
|
|
|
+ this.rowDetail = row;
|
|
|
+ console.log('查看详情', res);
|
|
|
+ });
|
|
|
+ // this.ruleForm.title = row.managementName;
|
|
|
+ // this.ruleForm.newPhone = row.phone;
|
|
|
}
|
|
|
}
|
|
|
};
|