Explorar o código

Merge remote-tracking branch 'origin/master'

user5 hai 1 ano
pai
achega
585fee8bcd

+ 2 - 2
src/api/jy/MeetingRoomService.js

@@ -34,11 +34,11 @@ export default class MeetingRoomService{
 		})
 	}
 
-	checkTime(startTime){
+	checkTime(startDate){
 		return request({
 			url: prefix + '/meetingRoom/checkTime',
 			method: 'get',
-			params: {startTime:startTime}
+			params: {startDate:startDate}
 		})
 	}
 

+ 126 - 0
src/api/jy/NotifyService.js

@@ -0,0 +1,126 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class NotifyService {
+	save (inputForm) {
+		return request({
+			url: prefix+`/jy/notify/save`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	delete (ids) {
+		return request({
+			url: prefix+'/jy/notify/delete',
+			method: 'delete',
+			params: {ids: ids}
+		})
+	}
+
+	close (id) {
+		return request({
+			url:prefix+ '/jy/notify/close',
+			method: 'delete',
+			params: {id: id}
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url:prefix+ `/jy/notify/queryById`,
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	query (params) {
+		return request({
+			url:prefix+ `/jy/notify/queryById`,
+			method: 'get',
+			params: params
+		})
+	}
+
+	list (params) {
+		return request({
+			url:prefix+ '/jy/notify/list',
+			method: 'get',
+			params: params
+		})
+	}
+
+	myNotifyList (params) {
+		return request({
+			url:prefix+ '/jy/notify/myNotifyList',
+			method: 'get',
+			params: params
+		})
+	}
+	updateStatusById (data) {
+		return request({
+			url:prefix+ '/jy/notify/updateStatusById',
+			method: 'post',
+			data: data
+		})
+	}
+	pushNotifyRecord (id) {
+		return request({
+			url:prefix+ '/jy/notify/pushNotifyRecord',
+			method: 'post',
+			data: {id: id}
+		})
+	}
+	saveForm (inputForm) {
+		return request({
+			url: prefix+`/jy/notify/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	addComment (param) {
+		return request({
+			url:prefix+ '/jy/notify/addComment',
+			method: 'post',
+			data: param
+		})
+	}
+	findComment (notifyId) {
+		return request({
+			url:prefix+ '/jy/notify/findComment',
+			method: 'get',
+			params: {notifyId:notifyId}
+		})
+	}
+
+	delComment (id) {
+		return request({
+			url:prefix+ '/jy/notify/delComment',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	portionRead (ids) {
+		return request({
+			url:prefix+ '/jy/notify/portionRead',
+			method: 'post',
+			params: {ids: ids}
+		})
+	}
+
+	readAll () {
+		return request({
+			url:prefix+ '/jy/notify/readAll',
+			method: 'post'
+		})
+	}
+
+	saveLog(inputForm){
+		return request({
+			url: prefix+`/jy/notify/saveLog`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+}

+ 155 - 0
src/components/officeTreeSelect/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="400px"
+      append-to-body
+      height="500px"
+      @close="close"
+      @keyup.enter.native="getOffice"
+	  v-model="visibleChoose">
+
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="部门名称" clearable></el-input>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" >查询</el-button>
+<!--            <el-button @click="resetSearch()" size="small" >重置</el-button>-->
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="350px"
+          :loading="loading"
+          size="small"
+          ref="officeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :show-header="false"
+          :row-config="{isCurrent: true}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId', expandAll: true}"
+          :checkbox-config="{trigger: 'row'}">
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column title="部门" align="left" field="name" tree-node></vxe-column>
+        </vxe-table>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="getOffice()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import InputNumber from '@/views/workContract/InputNumber.vue'
+  import officeService from '@/api/sys/OfficeService'
+  import SelectUserTree from '@/views/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visibleChoose: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: ''
+        }
+      }
+    },
+
+    created () {
+
+    },
+    components: {
+      SelectUserTree,
+      InputNumber
+    },
+    methods: {
+      init () {
+        this.title = '部门选择'
+        this.visibleChoose = true
+		  console.log('vis',this.visibleChoose)
+        this.list()
+      },
+      // 表单提交
+      getOffice () {
+        let rows = this.$refs.officeTable.getCheckboxRecords()
+        if (this.commonJS.isEmpty(rows)) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        let list = []
+        if (!this.commonJS.isEmpty(rows)) {
+          rows.forEach(item => {
+            let p = {
+              id: item.id,
+              name: item.name
+            }
+            list.push(p)
+          })
+        }
+        this.close()
+        this.$emit('getOfficeChoose', list)
+      },
+      list () {
+        this.dataList = []
+        this.loading = true
+        officeService.treeData({
+          'current': 1,
+          'size': -1,
+          'orders': this.tablePage.orders,
+			'type':2,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('data',data)
+          this.dataList = data[0].children
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle (currentPage, pageSize) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visibleChoose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0;
+  }
+  /deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+    margin-bottom: 0px;
+  }
+</style>

+ 3 - 1
src/views/flowable/task/TaskForm.vue

@@ -705,6 +705,7 @@ export default {
 		// Process_1698909233438 嘉溢-项目归档
 		// Process_1699235944179 嘉溢-环评项目资质
 		// Process_1699428058248 嘉溢-会议室预约
+		// Process_1699843592979 嘉溢-发起通知
 
 		// 驳回
 		reject(vars) {
@@ -754,7 +755,8 @@ export default {
 				this.procDefId.includes('Process_1698800678864') ||
 				this.procDefId.includes('Process_1698909233438') ||
 				this.procDefId.includes('Process_1699235944179') ||
-				this.procDefId.includes('Process_1699428058248')
+				this.procDefId.includes('Process_1699428058248') ||
+				this.procDefId.includes('Process_1699843592979')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 61 - 32
src/views/jy/daily/MeetingRoomForm.vue

@@ -13,35 +13,28 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
-					<el-form-item label="会议开始时间" prop="startTime"
+					<el-form-item label="会议开始时间" prop="startDate"
 								  :rules="[
-								  {required: true, message:'会议开始时间不能为空', trigger:'blur'}]">
+								  {required: true, message:'会议开始日期不能为空', trigger:'blur'}]">
 						<el-date-picker
-							style="width: 100%"
-							placement="bottom-start"
-							v-model="inputForm.startTime"
-							type="datetime"
-							placeholder="选择日期时间"
-							format="YYYY-MM-DD HH:mm"
-							value-format="YYYY-MM-DD HH:mm"
-							date-format="YYYY-MM-DD"
-							time-format="HH:mm"
+							style="width:50%;"
+							v-model="inputForm.startDate"
+							type="date"
+							value-format="YYYY-MM-DD"
+							placeholder="请选择日期"
 							:disabled-date="disableDate"
-							:disabled-hours="disabledHour"
-							:disabled-minutes="disabledMinute"
-							:popper-options="{
-							   modifiers: [
-									{
-										name: 'flip',
-										options: {
-											fallbackPlacements: ['bottom'],
-											allowedAutoPlacements: ['bottom'],
-										}
-									}
-								]
-							}"
-							@blur="checkTime"
-						></el-date-picker>
+							:size="default"
+							@change="checkTime"
+						/>
+						<el-select v-model="inputForm.startTime" placeholder="请选择时间" style="width:50%;">
+							<el-option
+								v-for="item in dateList"
+								:disabled="item.disabled"
+								:key="item.value"
+								:label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -104,6 +97,7 @@
 					id: '',
 					title: '',
 					startTime: '',
+					startDate: '',
 					duration: '',
 					createById: this.$store.state.user.id,
 					createByName: this.$store.state.user.name,
@@ -112,6 +106,7 @@
 				},
 				baseKey: '',
 				keyWatch: '',
+				dateList:[]
 			}
 		},
 		MeetingRoom:null,
@@ -167,6 +162,7 @@
 					id:'',
 					title:'',
 					startTime:'',
+					startDate:'',
 					duration:'',
 					createById:'',
 					createByName:'',
@@ -252,6 +248,14 @@
 				console.log('5',this.inputForm)
 				if (status === 'save') {
 					// 暂存
+					if (this.commonJS.isEmpty(this.inputForm.startDate)|| this.commonJS.isEmpty(this.inputForm.startTime)) {
+						this.$message.error('请选择会议开始时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.duration)) {
+						this.$message.error('请选择会议时长')
+						this.loading = false
+					}
 					this.loading = true
 					this.inputForm.status = '1'
 					this.meetingRoomServie.saveForm(this.inputForm).then((data) => {
@@ -262,7 +266,7 @@
 					})
 					return
 				} else if (status === 'start') {
-					if (this.commonJS.isEmpty(this.inputForm.startTime)) {
+					if (this.commonJS.isEmpty(this.inputForm.startDate)|| this.commonJS.isEmpty(this.inputForm.startTime)) {
 						this.$message.error('请选择会议开始时间')
 						this.loading = false
 					}
@@ -280,6 +284,7 @@
 				this.$refs['inputForm'].validate((valid) => {
 					if (valid) {
 						this.loading = true
+						console.log('form',this.inputForm)
 						this.meetingRoomServie.saveForm(this.inputForm).then((data) => {
 							callback(data.businessTable, data.businessId, this.inputForm)
 							this.$refs.inputForm.resetFields()
@@ -387,15 +392,39 @@
 				return arrs;
 			},
 			checkTime(){
-				if (this.inputForm.startTime !== ''){
-					this.meetingRoomServie.checkTime(this.inputForm.startTime).then((data)=>{
-						if (data === false){
-							this.$message.error('所有人都在忙,请选择其他时间')
-							this.loading = false
+				this.dateList=this.$dictUtils.getDictList('jy_meeting_date')
+				console.log('this.dateList',this.dateList)
+				this.inputForm.startTime=''
+				if (this.commonJS.isNotEmpty(this.inputForm.startDate)){
+					this.meetingRoomServie.checkTime(this.inputForm.startDate).then((data)=>{
+						console.log('data',data)
+						if (this.commonJS.isNotEmpty(data)){
+							var num = [];
+							for (var key in data) {
+								console.log(data[key])
+								let date1=data[key].replace(/:/g, '')
+
+								for (let i=0;i<this.dateList.length;i++){
+									let date2=this.dateList[i].value.replace(/:/g, "")
+									console.log('date2',date2)
+									if (date1===date2){
+										num.push(i)
+									}
+								}
+
+							}
+							console.log('num', num)
+							for (let i=0;i<num.length;i++){
+								console.log('num[i]', num[i])
+								this.dateList[num[i]].disabled = true
+							}
+
 						}
 					})
+
 				}
 
+
 			}
 
 		}

+ 7 - 14
src/views/jy/daily/MeetingRoomList.vue

@@ -25,20 +25,13 @@
 			</el-form-item>
 			<el-form-item v-if="showHideItem" label="会议开始时间" prop="meetingDates">
 				<el-date-picker
-					placement="bottom-start"
-					format="YYYY-MM-DD HH:mm"
-					value-format="YYYY-MM-DD HH:mm"
-					date-format="YYYY-MM-DD"
-					time-format="HH:mm"
+					style="width:50%;"
 					v-model="searchForm.meetingDates"
-					type="datetimerange"
-					:disabled-date="disableDate"
-					:disabled-hours="disabledHour"
-					:disabled-minutes="disabledMinute"
-					range-separator="至"
-					start-placeholder="开始日期"
-					end-placeholder="结束日期">
-				</el-date-picker>
+					type="daterange"
+					value-format="YYYY-MM-DD"
+					placeholder="请选择日期"
+					:size="default"
+				/>
 			</el-form-item>
 
 			<el-form-item>
@@ -81,7 +74,7 @@
 					:checkbox-config="{}">
 					<vxe-column type="seq" width="60" title="序号"></vxe-column>
 					<vxe-column min-width="160" align="center" title="标题" field="title"></vxe-column>
-					<vxe-column min-width="160" align="center" title="会议开始时间" field="startTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="会议开始时间" field="startDateTime"></vxe-column>
 					<vxe-column min-width="160" align="center" title="会议时长" field="duration">
 						<template #default="scope">
 							<span v-if="scope.row.duration === 30">{{scope.row.duration}}分钟</span>

+ 274 - 0
src/views/jy/notify/MyNotifyList.vue

@@ -0,0 +1,274 @@
+<template>
+  <div class="page">
+      <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <!-- 搜索框-->
+		     <el-form-item label="标题" prop="title">
+                <el-input size="small" v-model="searchForm.title" placeholder="标题" clearable></el-input>
+		     </el-form-item>
+        <el-form-item label="查阅状态" prop="readFlag">
+          <el-select size="small" v-model="searchForm.readFlag" placeholder="查阅状态" clearable>
+            <el-option
+              v-for="item in $dictUtils.getDictList('oa_notify_read')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="类型" prop="type">
+          <el-select size="small" v-model="searchForm.type" placeholder="类型" clearable>
+            <el-option
+              v-for="item in $dictUtils.getDictList('oa_notify_type')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="发布者" prop="createName">
+          <UserSelect :limit='1' :userName="searchForm.createName" @getValue='(value, label) => {searchForm.createName = label}'></UserSelect>
+        </el-form-item>
+        <el-form-item label="创建时间" prop="createDates">
+          <el-date-picker
+            placement="bottom-start"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            v-model="searchForm.createDates"
+            type="datetimerange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+          <el-form-item>
+            <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+      </el-form>
+       <div class="jp-table top">
+
+         <vxe-toolbar :refresh="{query: refreshList}" custom>
+           <template #buttons>
+             <el-button type="primary" size="small" @click="readAll()">全部标记已读</el-button>
+             <el-button :disabled="$refs.notifyTable && $refs.notifyTable.getCheckboxRecords().length === 0" type="warning" size="small" @click="portionRead()">标记为已读</el-button>
+           </template>
+         </vxe-toolbar>
+         <el-tabs v-model="activeName" @tab-click="handleClick">
+           <el-tab-pane label="全部" name="all"></el-tab-pane>
+           <el-tab-pane label="未读" name="read"></el-tab-pane>
+           <el-tab-pane label="已读" name="un_read"></el-tab-pane>
+         </el-tabs>
+     <div style="height: calc(100% - 80px);">
+        <vxe-table
+			border="inner"
+			auto-resize
+			resizable
+			height="auto"
+			:loading="loading"
+			ref="notifyTable"
+			show-header-overflow
+			show-overflow
+			highlight-hover-row
+			:menu-config="{}"
+			:print-config="{}"
+			:import-config="{}"
+			:export-config="{}"
+			@sort-change="sortChangeHandle"
+			:sort-config="{remote:true}"
+			:data="dataList"
+			:checkbox-config="{}">
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column type="checkbox"  width="60px"></vxe-column>
+            <vxe-column min-width="180px" title="标题" field="title" align="center">
+              <template #default="scope">
+                 <el-link  type="primary" :underline="false" @click="view(scope.row.id)">{{scope.row.title}}</el-link>
+              </template>
+            </vxe-column>
+            <vxe-column min-width="180px" title="类型" field="type" align="center">
+                <template #default="scope">
+                  {{ $dictUtils.getDictLabel("oa_notify_type", scope.row.type, '-') }}
+                </template>
+            </vxe-column>
+
+            <vxe-column min-width="180px" title="查阅状态" field="status" align="center">
+              <template #default="scope">
+                <el-tag type="success" v-if="scope.row.readFlag === '1'"> {{ $dictUtils.getDictLabel("oa_notify_read", scope.row.readFlag, '-') }}</el-tag>
+                <el-tag type="danger" v-if="scope.row.readFlag === '0'"> {{ $dictUtils.getDictLabel("oa_notify_read", scope.row.readFlag, '-') }}</el-tag>
+              </template>
+            </vxe-column>
+             <vxe-column min-width="180px" title="发布者" field="createBy.name" align="center"></vxe-column>
+<!--          <vxe-column min-width="180px" title="通告时间" field="beginDate" align="center" >-->
+<!--            <template #default="scope">-->
+<!--                 <span v-if="scope.row.notifyType === '0'">-->
+<!--                   {{commonJS.isNotEmpty(scope.row.beginDate) && commonJS.isNotEmpty(scope.row.endDate)-->
+<!--                   ?-->
+<!--                   moment(scope.row.beginDate).format('YYYY-MM-DD') + " 至 " + moment(scope.row.endDate).format('YYYY-MM-DD')-->
+<!--                   :-->
+<!--                   ''}}-->
+<!--                 </span>-->
+<!--              <span v-else-if="scope.row.notifyType === '1'">-->
+<!--                   长期通告-->
+<!--                 </span>-->
+<!--            </template>-->
+<!--          </vxe-column>-->
+          <vxe-column  min-width="180px" title="创建时间" field="createTime" align="center" ></vxe-column>
+            <vxe-column title="操作" width="80" fixed="right" align="center">
+                <template  #default="scope">
+                    <el-button  type="text" size="mini" @click="view(scope.row.id)">查看</el-button>
+                </template>
+            </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+        <!-- 弹窗, 新增 / 修改 -->
+    <NotifyForm  ref="notifyForm" @refreshDataList="refreshList"></NotifyForm>
+  </div>
+  </div>
+</template>
+
+<script>
+  import NotifyForm from './NotifyForm'
+  import NotifyService from '@/api/jy/NotifyService'
+  import UserSelect from '@/components/userSelect'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          title: '',
+          type: '',
+          createName: '',
+          createDates: [],
+          readFlag: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        activeName: ''
+      }
+    },
+    components: {
+      NotifyForm,
+      UserSelect
+    },
+    notifyService: null,
+    created () {
+      this.notifyService = new NotifyService()
+      this.activeName = 'all'
+    },
+    activated () {
+      this.refreshList()
+      this.activeName = 'all'
+    },
+
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.notifyService.myNotifyList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          isSelf: true,
+          isClose: '0',
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+  // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 查看
+      view (id) {
+        this.$refs.notifyForm.init('read', id)
+      },
+      resetSearch () {
+        this.activeName = 'all'
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+
+      // 全部已读
+      readAll () {
+        this.$confirm(`确定将全部通告标记为已读吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.notifyService.readAll().then((data) => {
+            this.loading = false
+            this.$message({
+              message: data,
+              type: 'success',
+              duration: 1500
+            })
+            this.refreshList()
+          })
+        })
+      },
+
+      // 部分已读
+      portionRead (id) {
+        let ids = id || this.$refs.notifyTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定将选定通告标记为已读吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.notifyService.portionRead(ids).then((data) => {
+            this.loading = false
+            this.$message({
+              message: data,
+              type: 'success',
+              duration: 1500
+            })
+            this.refreshList()
+          })
+        })
+      },
+      handleClick (event) {
+        if (event.name === 'all') {
+          this.searchForm.readFlag = ''
+        }
+        if (event.name === 'read') {
+          this.searchForm.readFlag = '0'
+        }
+        if (event.name === 'un_read') {
+          this.searchForm.readFlag = '1'
+        }
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 805 - 0
src/views/jy/notify/NotifyForm.vue

@@ -0,0 +1,805 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1400px"
+      height="500px"
+      @close="close"
+      append-to-body
+      @keyup.enter.native=""
+	  v-model="visible">
+		<el-form  :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view' || method === 'read'?'readonly':''" :disabled="method==='view' || method === 'read' || status === 'audit' || status === 'taskFormDetail'"
+				  label-width="120px" @submit.native.prevent>
+			<el-row  :gutter="15">
+<!--				<el-col :span="24">-->
+<!--					<el-form-item label="通告状态" prop="notifyType"-->
+<!--								  :rules="[-->
+<!--                  {required: true, message:'通告状态不能为空', trigger:'blur'}-->
+<!--                 ]">-->
+<!--						<el-radio v-model="inputForm.notifyType" v-for="item in $dictUtils.getDictList('oa_notify_status')" :label="item.value" style="margin-right: 20px">-->
+<!--							{{item.label}}</el-radio>-->
+<!--						&lt;!&ndash;              <el-select size="medium" @change="changeNotifyType" v-model="inputForm.notifyType" placeholder="请选择"  style="width: 100%;">&ndash;&gt;-->
+<!--						&lt;!&ndash;                <el-option&ndash;&gt;-->
+<!--						&lt;!&ndash;                  v-for="item in $dictUtils.getDictList('oa_notify_status')"&ndash;&gt;-->
+<!--						&lt;!&ndash;                  :key="item.value"&ndash;&gt;-->
+<!--						&lt;!&ndash;                  :label="item.label"&ndash;&gt;-->
+<!--						&lt;!&ndash;                  :value="item.value">&ndash;&gt;-->
+<!--						&lt;!&ndash;                </el-option>&ndash;&gt;-->
+<!--						&lt;!&ndash;              </el-select>&ndash;&gt;-->
+<!--					</el-form-item>-->
+<!--				</el-col>-->
+				<el-col :span="12">
+					<el-form-item label="类型" prop="type"
+								  :rules="[
+                  {required: true, message:'类型不能为空', trigger:'blur'}
+                 ]">
+						<el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">
+							<el-option
+								v-for="item in $dictUtils.getDictList('oa_notify_type')"
+								:key="item.value"
+								:label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="标题" prop="title"
+								  :rules="[
+                  {required: true, message:'标题不能为空', trigger:'blur'}
+                 ]">
+						<el-input size="medium" v-model="inputForm.title" placeholder="请填写标题"     ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="文号" prop="no"
+								  :rules="[
+                 ]">
+						<el-input size="medium" v-model="inputForm.no" placeholder="请填写文号"     ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12" v-if="inputForm.notifyType === '0'">
+					<el-form-item label="通告时间" prop="dates"
+								  :rules="[
+                                {required: true, message:'通告时间不能为空', trigger:'blur'}
+                   ]">
+						<el-date-picker
+							placement="bottom-start"
+							format="YYYY-MM-DD HH:mm:ss"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							v-model="inputForm.dates"
+							type="datetimerange"
+							range-separator="至"
+							start-placeholder="开始日期"
+							end-placeholder="结束日期"
+							clearable>
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="创建人" prop="createBy.name"
+								  :rules="[
+                   ]">
+						<el-input size="medium" :disabled="true" v-model="inputForm.createBy.name" placeholder="请填写创建人" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="所属部门" prop="officeId"
+								  :rules="[
+                   ]">
+						<SelectTree
+							:disabled="true"
+							ref="officeTree"
+							:props="{
+                          value: 'id',             // ID字段名
+                          label: 'name',         // 显示名称
+                          children: 'children'    // 子级字段名
+                        }"
+							:url="`/system-server/sys/office/treeData?type=2`"
+							:value="inputForm.officeId"
+							:accordion="true"
+							size="large"
+							@getValue="(value) => {inputForm.officeId=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="内容" prop="content"
+								  :rules="[
+                   ]">
+						<WangEditor ref="contentEditor" v-model="inputForm.content" @getUrl="(url, lsUrl) => {
+                        inputForm.editorFilesDTOList.push({temporaryUrl: lsUrl, url: url})
+                        }"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<el-divider content-position="left">
+				<div style="float:left;"><i class="el-icon-document"></i> 通告范围-部门</div>
+				<div style="float:left;">
+					<el-button style="margin-left: 20px" type="primary"  size="mini" @click="openOfficeChoose" plain>
+						选择
+					</el-button>
+				</div>
+			</el-divider>
+			<el-row  :gutter="15" >
+				<el-col :span="24">
+					<el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+						<vxe-table
+							border
+							:column-config="{resizable: true}"
+							show-overflow
+							show-footer
+							:key="tableKeyOffice"
+							ref="officeTable"
+							class="vxe-table-element"
+							:data="inputForm.pluginNotifyOfficesDTOList"
+							style="width: 100%"
+							@cell-click=""
+							@edit-closed=""
+							highlight-current-row
+						>
+							<vxe-table-column align="center" field="officeName" title="部门"></vxe-table-column>
+							<vxe-table-column align="center" title="操作" width="100">
+								<template v-slot="scope">
+									<el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'office')">删除</el-button>
+								</template>
+							</vxe-table-column>
+						</vxe-table>
+					</el-form>
+				</el-col>
+			</el-row>
+
+			<div style="margin-top: 30px">
+				<el-divider content-position="left" >
+					<div style="float: left"><i class="el-icon-document"></i> 通告范围-成员</div>
+					<UserSelectButton ref="userSelectButton" :disabled="status === 'audit' || status === 'taskFormDetail'" @getValue="(value) => {openUserChoose(value)}"></UserSelectButton>
+				</el-divider>
+			</div>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+						<vxe-table
+							border
+							:column-config="{resizable: true}"
+							show-overflow
+							show-footer
+							:key="tableKeyUser"
+							ref="userTable"
+							class="vxe-table-element"
+							:data="inputForm.pluginNotifyUserDTOList"
+							style=""
+							@cell-click=""
+							@edit-closed=""
+							highlight-current-row
+						>
+							<vxe-table-column align="center" field="userName" title="姓名"></vxe-table-column>
+							<vxe-table-column align="center" field="officeName" title="部门"></vxe-table-column>
+							<vxe-table-column align="center" title="操作" width="100">
+								<template v-slot="scope">
+									<el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'user')">删除</el-button>
+								</template>
+							</vxe-table-column>
+						</vxe-table>
+					</el-form>
+				</el-col>
+			</el-row>
+		</el-form>
+		<!--        附件-->
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<OfficeTreeSelect ref="officeTreeSelect" @getOfficeChoose="getOfficeChoose"></OfficeTreeSelect>
+
+
+		<el-divider content-position="left"><i class="el-icon-document"></i>访问日志</el-divider>
+		<div style="height: auto">
+		<vxe-table
+			border="inner"
+			:loading="loading"
+			size="small"
+			ref="logTable"
+			show-header-overflow
+			show-overflow
+			highlight-hover-row
+			:menu-config="{}"
+			:print-config="{}"
+			:import-config="{}"
+			:export-config="{}"
+			@sort-change="sortChangeHandle"
+			:sort-config="{remote:true}"
+			:data="inputForm.logList"
+			:checkbox-config="{}">
+			<vxe-column type="seq" width="60" title="序号"></vxe-column>
+			<vxe-column min-width="180px" title="访问人" field="createName" align="center"></vxe-column>
+			<vxe-column min-width="180px" title="首次访问时间" field="createTime" align="center"></vxe-column>
+			<vxe-column min-width="180px" title="最近访问时间" field="updateTime" align="center"></vxe-column>
+			<vxe-column min-width="180px" title="访问次数" field="count" align="center"></vxe-column>
+		</vxe-table>
+		</div>
+		<div class="tableLine"><span class="midText">共有{{inputForm.logCount}}人访问 <el-link style="color: red" type="text" size="mini" v-show="inputForm.logCount>3&&lookList" @click="findLogList(inputForm.comments.length)">查看全部</el-link></span></div>
+
+		<!--      评论-->
+      <div v-if="method === 'view' || method === 'read'" style="margin-top: 90px">
+        <el-divider content-position="left"><i class="el-icon-document"></i>发表评论</el-divider>
+        <el-row>
+          <el-col style="margin-bottom: 20px">
+            <el-input v-model="inputForm.comment"
+                      type="textarea"
+                      :rows="5"
+                      maxlength="500"
+                      placeholder="请输入评论信息"
+                      show-word-limit>
+            </el-input>
+          </el-col>
+          <el-button style="float: right" type="primary" size="mini" @click="pushComment()" plain>
+            发表
+          </el-button>
+          <el-button style="float: right; margin-right: 20px" type="primary" size="mini" @click="cleanComment()" plain>
+            清空
+          </el-button>
+        </el-row>
+
+        <div v-for="(item, index) in inputForm.comments" v-show="index<initLength">
+          <el-divider></el-divider>
+          <div class="font_div" style="width: 100%; height:30px;"><span>{{item.userName}}</span></div>
+          <div style="margin-left: 20px; height:45px;"><span>{{item.comments}}</span></div>
+          <div style="width: 100%; height:30px;">
+            <span>{{item.deff}}</span>
+            <el-link v-if="$store.state.user.id === item.createId || isAdmin" style="float: right" type="text" size="mini" @click="delComment(item.id)">删除</el-link>
+          </div>
+        </div>
+		  <el-divider></el-divider>
+		  <div class="tableLine"><span class="midText"><span v-show="inputForm.comments.length>3&&lookMore">还有{{inputForm.comments.length-3}}条评论</span> <el-link style="color: red" type="text" size="mini" v-show="inputForm.comments.length>3&&lookMore" @click="findComment(inputForm.comments.length)"> 查看全部</el-link></span></div>
+	  </div>
+		<div style="margin-top: 30px">
+		  <span slot="footer" class="dialog-footer">
+			  <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button size="small" v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmitBefore()">确定</el-button>
+		  </span>
+		</div>
+    </el-dialog>
+
+    <OfficeTreeSelect ref="officeTreeSelect" @getOfficeChoose="getOfficeChoose"></OfficeTreeSelect>
+  </div>
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import NotifyService from '@/api/jy/NotifyService'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import WangEditor from '@/components/editor/WangEditor'
+	import OfficeTreeSelect from '@/components/officeTreeSelect'
+	import UserSelectButton from '@/components/userSelectButton/DividerButton'
+	import UserService from '@/api/sys/UserService'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+      	lookMore:true,
+      	lookList:true,
+	    initLength:3,
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '1',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: '',
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: [],
+          comments: [],
+          comment: '',
+		  logList:[],
+			pageSize: 3,
+			logCount:''
+        },
+        keyWatch: '',
+        tableKeyOffice: '',
+        tableKeyUser: '',
+        visible: false,
+        isAdmin: false
+      }
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+		'keyWatch': {
+			handler (newVal) {
+				if (this.commonJS.isNotEmpty(this.bus)) {
+					this.init('', this.bus)
+				} else {
+					this.$nextTick(() => {
+						this.$refs.inputForm.resetFields()
+					})
+				}
+			}
+		},
+
+    },
+    components: {
+      UserSelect,
+      SelectTree,
+      WangEditor,
+
+      UserSelectButton,
+      UpLoadComponent
+    },
+    notifyService: null,
+    created () {
+      this.notifyService = new NotifyService()
+    },
+    methods: {
+		getKeyWatch(keyWatch) {
+			this.keyWatch = keyWatch
+		},
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+		  UserService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '1',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: ['', ''],
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: [],
+          comments: [],
+          comment: '',
+		  logList:[],
+		  pageSize: 3,
+        }
+        this.inputForm.id = id
+        if (method === 'add') {
+          this.title = '新建通告'
+        } else if (method === 'edit') {
+          this.title = '修改通告'
+        } else if (method === 'view') {
+          this.title = '查看通告'
+        } else if (method === 'read') {
+          this.title = '阅读通告'
+        }
+        this.visible = true
+        this.loading = false
+	    this.$nextTick(() => {
+		  this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.$refs.contentEditor.clear()
+          this.notifyService.query({id: this.inputForm.id, isSelf: method === 'read',size:this.inputForm.pageSize}).then((data) => {
+            this.checkIsAdmin()
+            this.$refs.uploadComponent.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.method === 'view' || this.method === 'read') {
+              this.$refs.contentEditor.disable()
+            } else {
+              this.$refs.contentEditor.enable()
+            }
+            // if (this.commonJS.isNotEmpty(this.inputForm.content)) {
+            //   this.$refs.contentEditor.init(this.inputForm.content)
+            // }
+			  this.inputForm.logCount=data.logCount
+			  this.inputForm.logList=data.notifyLogList
+            if (this.commonJS.isEmpty(this.inputForm.editorFilesDTOList)) {
+              this.inputForm.editorFilesDTOList = []
+            }
+			  if (this.commonJS.isEmpty(this.inputForm.createBy.id)) {
+				  this.inputForm.createBy.id = this.$store.state.user.id
+				  this.inputForm.createBy.name = this.$store.state.user.name
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.officeId)) {
+				  this.inputForm.officeId = this.$store.state.user.office.id
+			  }
+            this.inputForm.dates = ['', '']
+            if (this.commonJS.isNotEmpty(this.inputForm.beginDate) && this.commonJS.isNotEmpty(this.inputForm.endDate)) {
+              this.inputForm.dates[0] = this.inputForm.beginDate
+              this.inputForm.dates[1] = this.inputForm.endDate
+            }
+            if (this.commonJS.isEmpty(this.inputForm.notifyType)) {
+              this.inputForm.notifyType = '0'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyOfficesDTOList)) {
+              this.inputForm.pluginNotifyOfficesDTOList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.inputForm.pluginNotifyUserDTOList = []
+            }
+            if (this.method === 'view' || this.method === 'read') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'notify')
+            } else {
+              this.$refs.uploadComponent.newUpload('edit', this.inputForm.workAttachmentDtoList, 'notify')
+            }
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (method === 'read') {
+              this.$emit('refreshDataList')
+            }
+            this.loading = false
+          })
+        })
+      },
+      doSubmitBefore () {
+        if (this.inputForm.status === '5') {
+          this.$confirm(`修改后会重新发起通告,确定修改数据吗?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.doSubmit()
+          })
+        } else {
+          this.doSubmit()
+        }
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyOfficesDTOList) && this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.$message.error('通告范围(部门或成员),至少填写一项')
+              this.loading = false
+              throw new Error('通告范围(部门或成员),至少填写一项')
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isNotEmpty(this.inputForm.dates)) {
+              this.inputForm.beginDate = this.inputForm.dates[0]
+              this.inputForm.endDate = this.inputForm.dates[1]
+              if (this.commonJS.isNotEmpty(this.inputForm.beginDate) && this.commonJS.isNotEmpty(this.inputForm.endDate)) {
+                if (this.inputForm.beginDate === this.inputForm.endDate) {
+                  if (this.inputForm.notifyType === '0') {
+                    this.$message.error('通告起止时间不可以相同')
+                    this.loading = false
+                    throw new Error('通告起止时间不可以相同')
+                  }
+                }
+              } else {
+                if (this.inputForm.notifyType === '0') {
+                  this.$message.error('请填写通告时间')
+                  this.loading = false
+                  throw new Error('请填写通告时间')
+                }
+              }
+            } else {
+              this.inputForm.beginDate = ''
+              this.inputForm.endDate = ''
+              if (this.inputForm.notifyType === '0') {
+                this.$message.error('请填写通告时间')
+                this.loading = false
+                throw new Error('请填写通告时间')
+              }
+            }
+            this.getEditorFilesDTOList()
+            this.notifyService.saveForm(this.inputForm).then((data) => {
+              this.loading = false
+              this.close()
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.contentEditor.enable()
+        this.$emit('refreshDataList')
+        this.visible = false
+	    this.lookMore=true,
+		this.lookList=true,
+	    this.initLength=3,
+        this.inputForm = {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: '',
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: [],
+          comments: [],
+          comment: '',
+			logList:[],
+			pageSize: 3,
+        }
+      },
+      changeNotifyType () {
+        this.inputForm.beginDate = ''
+        this.inputForm.endDate = ''
+        this.inputForm.dates = ['', '']
+      },
+      daterangeChange (e) {
+        this.$nextTick(() => {
+          this.$forceUpdate()
+        })
+      },
+      getEditorFilesDTOList () {
+        let a = []
+        if (this.commonJS.isNotEmpty(this.inputForm.editorFilesDTOList)) {
+          this.inputForm.content = this.inputForm.content.replace(/&amp;/g, '&')
+          this.inputForm.editorFilesDTOList.forEach((item) => {
+            if (this.inputForm.content.includes(item.temporaryUrl)) {
+              a.push(item)
+            }
+          })
+        }
+        this.inputForm.editorFilesDTOList = []
+        a.forEach((item) => {
+          this.inputForm.editorFilesDTOList.push(item)
+        })
+      },
+      openOfficeChoose () {
+        this.$refs.officeTreeSelect.init()
+      },
+      getOfficeChoose (list) {
+        let _this = this
+        const wait = () => new Promise((resolve, reject) => {
+          if (_this.commonJS.isEmpty(_this.inputForm.pluginNotifyOfficesDTOList)) {
+            _this.inputForm.pluginNotifyOfficesDTOList = []
+            resolve()
+          } else if (_this.commonJS.isEmpty(list)) {
+            resolve()
+          } else {
+            list.forEach((item, index) => {
+              _this.inputForm.pluginNotifyOfficesDTOList.forEach((office, rowIndex) => {
+                if (item.id === office.officeId || item.name === office.officeName) {
+                  this.$refs.officeTable.remove(office)
+                  this.inputForm.pluginNotifyOfficesDTOList.splice(rowIndex, 1)
+                  this.tableKeyOffice = Math.random()
+                }
+              })
+            })
+            resolve()
+          }
+        })
+        wait().then(() => {
+          list.forEach((item) => {
+            let d = {
+              officeName: item.name,
+              officeId: item.id
+            }
+            this.$refs.officeTable.insertAt(d)
+            this.inputForm.pluginNotifyOfficesDTOList.push(d)
+            this.tableKeyOffice = Math.random()
+          })
+        })
+      },
+      removeEvent (row, rowIndex, type) {
+        if (type === 'office') {
+          this.$refs.officeTable.remove(row)
+          this.inputForm.pluginNotifyOfficesDTOList.splice(rowIndex, 1)
+          this.tableKeyOffice = Math.random()
+        }
+        if (type === 'user') {
+          this.$refs.userTable.remove(row)
+          this.inputForm.pluginNotifyUserDTOList.splice(rowIndex, 1)
+          this.tableKeyUser = Math.random()
+        }
+      },
+      openUserChoose (value) {
+        if (this.commonJS.isNotEmpty(value)) {
+          this.userService.queryDetailList(value).then((data) => {
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.inputForm.pluginNotifyUserDTOList = []
+            }
+            data.forEach(item => {
+              this.inputForm.pluginNotifyUserDTOList.forEach((user, rowIndex) => {
+                if (this.commonJS.isEmpty(item.name) || user.userName === item.name || user.userId === item.id) {
+                  this.$refs.userTable.remove(user)
+                  this.inputForm.pluginNotifyUserDTOList.splice(rowIndex, 1)
+                  this.tableKeyUser = Math.random()
+                }
+              })
+            })
+            data.forEach(item => {
+              let param = {
+                userId: item.id,
+                userName: this.commonJS.isEmpty(item.name) ? '' : item.name,
+                officeName: this.commonJS.isEmpty(item.officeDTO) ? '' : this.commonJS.isEmpty(item.officeDTO.name) ? '' : item.officeDTO.name
+              }
+              this.$refs.userTable.insertAt(param)
+              this.inputForm.pluginNotifyUserDTOList.push(param)
+              this.tableKeyUser = Math.random()
+            })
+          })
+        }
+      },
+      pushComment () {
+        if (this.commonJS.isEmpty(this.inputForm.comment)) {
+          this.$message.error('请输入评论内容')
+          return
+        }
+        let param = {
+          notifyId: this.inputForm.id,
+          comments: this.inputForm.comment,
+          userId: this.$store.state.user.id
+        }
+        this.loading = true
+        this.notifyService.addComment(param).then((data) => {
+          this.init(this.method, this.inputForm.id)
+          this.$message.success(data)
+          this.loading = false
+        })
+      },
+      cleanComment () {
+        this.inputForm.comment = ''
+      },
+      delComment (id) {
+        this.notifyService.delComment(id).then(() => {
+          this.init(this.method, this.inputForm.id)
+        })
+      },
+      changeEditor (cont) {
+        this.inputForm.content = cont
+      },
+	  findComment(leg){
+		  this.lookMore=false
+		  this.initLength=leg
+	  },
+	  findLogList(){
+		  this.loading = true
+		  this.inputForm.pageSize=999999999
+		  this.notifyService.query({id: this.inputForm.id, isSelf: this.method === 'read',size:this.inputForm.pageSize}).then((data) => {
+			  this.checkIsAdmin()
+			  this.$refs.uploadComponent.clearUpload()
+			  this.inputForm = this.recover(this.inputForm, data)
+			  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+			  if (this.method === 'view' || this.method === 'read') {
+				  this.$refs.contentEditor.disable()
+			  } else {
+				  this.$refs.contentEditor.enable()
+			  }
+			  // if (this.commonJS.isNotEmpty(this.inputForm.content)) {
+			  //   this.$refs.contentEditor.init(this.inputForm.content)
+			  // }
+			  this.inputForm.logCount=data.logCount
+			  this.inputForm.logList=data.notifyLogList
+			  if (this.commonJS.isEmpty(this.inputForm.editorFilesDTOList)) {
+				  this.inputForm.editorFilesDTOList = []
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.createBy.id)) {
+				  this.inputForm.createBy.id = this.$store.state.user.id
+				  this.inputForm.createBy.name = this.$store.state.user.name
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.officeId)) {
+				  this.inputForm.officeId = this.$store.state.user.office.id
+			  }
+			  this.inputForm.dates = ['', '']
+			  if (this.commonJS.isNotEmpty(this.inputForm.beginDate) && this.commonJS.isNotEmpty(this.inputForm.endDate)) {
+				  this.inputForm.dates[0] = this.inputForm.beginDate
+				  this.inputForm.dates[1] = this.inputForm.endDate
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.notifyType)) {
+				  this.inputForm.notifyType = '0'
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.pluginNotifyOfficesDTOList)) {
+				  this.inputForm.pluginNotifyOfficesDTOList = []
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+				  this.inputForm.pluginNotifyUserDTOList = []
+			  }
+			  if (this.method === 'view' || this.method === 'read') {
+				  this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'notify')
+			  } else {
+				  this.$refs.uploadComponent.newUpload('edit', this.inputForm.workAttachmentDtoList, 'notify')
+			  }
+			  if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+				  this.inputForm.workAttachmentDtoList = []
+			  }
+			  if (this.method === 'read') {
+				  this.$emit('refreshDataList')
+			  }
+			  this.loading = false
+			  this.lookList=false
+		  })
+	  }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .w-e-menu {
+    z-index: 2 !important;
+  }
+  /deep/ .wtext {
+    height: 400px
+  }
+  .tableLine {
+	  margin-top: 30px;
+	  position: relative;
+	  margin: 0 auto;
+	  width: 600px;
+	  height: 1px;
+	  /*background-color: #d4d4d4;*/
+	  text-align: center;
+	  font-size: 16px;
+	  color: rgba(101, 101, 101, 1);
+  }
+  .midText {
+	  margin-top: 30px;
+	  margin-bottom: 10px;
+	  position: absolute;
+	  left: 50%;
+	  background-color: #ffffff;
+	  padding: 0 15px;
+	  transform: translateX(-50%) translateY(-50%);
+  }
+</style>

+ 426 - 0
src/views/jy/notify/NotifyList.vue

@@ -0,0 +1,426 @@
+<template>
+  <div class="page">
+      <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <!-- 搜索框-->
+		     <el-form-item label="标题" prop="title">
+                <el-input  size="default"  v-model="searchForm.title" placeholder="标题" clearable></el-input>
+		     </el-form-item>
+        <el-form-item label="类型" prop="type">
+          <el-select   size="default" v-model="searchForm.type" placeholder="类型" clearable>
+            <el-option
+              v-for="item in $dictUtils.getDictList('oa_notify_type')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="发布者" prop="createName">
+			<UserSelect :limit='1' v-model="searchForm.createName" @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect>
+        </el-form-item>
+        <el-form-item label="创建时间" prop="createDates">
+          <el-date-picker
+			  placement="bottom-start"
+			  format="YYYY-MM-DD HH:mm:ss"
+			  value-format="YYYY-MM-DD HH:mm:ss"
+			  v-model="searchForm.createDates"
+			  type="datetimerange"
+			  range-separator="至"
+			  start-placeholder="开始日期"
+			  end-placeholder="结束日期"
+			  clearable>
+          </el-date-picker>
+        </el-form-item>
+          <el-form-item>
+            <el-button   size="default" type="primary" @click="refreshList()"  icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()"  size="default" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+      </el-form>
+     <div class="jp-table top">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('jy_notify:info:add')" type="primary" size="default" icon="el-icon-plus" @click="start()">新建</el-button>
+<!--          <el-button v-if="hasPermission('notify:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.notifyTable && $refs.notifyTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+      </vxe-toolbar>
+     <div style="height: calc(100% - 90px)">
+        <vxe-table
+            border="inner"
+			auto-resize
+            resizable
+            height="100%"
+            :loading="loading"
+            ref="notifyTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :import-config="{}"
+            :export-config="{}"
+            @sort-change="sortChangeHandle"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :checkbox-config="{}">
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--            <vxe-column type="checkbox"  width="40px"></vxe-column>-->
+            <vxe-column min-width="180px" title="标题" field="title" align="center" >
+              <template  #default="scope">
+                <el-link  type="primary" :underline="false" v-if="hasPermission('jy_notify:info:view')"  @click="view(scope.row.id)">{{scope.row.title}}</el-link>
+                <span v-else>{{scope.row.title}}</span>
+<!--                <span >{{scope.row.title}}</span>-->
+              </template>
+            </vxe-column>
+            <vxe-column min-width="100px" title="类型" field="type" align="center" >
+                <template #default="scope">
+                  {{ $dictUtils.getDictLabel("oa_notify_type", scope.row.type, '-') }}
+                </template>
+            </vxe-column>
+            <vxe-column min-width="100px" title="查阅状态" field="readNum" align="center" >
+               <template #default="scope">
+                 <span v-if="scope.row.status === '5'">
+                   {{commonJS.isNotEmpty(scope.row.readNum) && commonJS.isNotEmpty(scope.row.unReadNum) ? scope.row.readNum + " / " + (parseInt(scope.row.readNum) + parseInt(scope.row.unReadNum)) : '0 / 0'}}
+                 </span>
+                 <span v-else>
+                   通告未发起
+                 </span>
+              </template>
+            </vxe-column>
+             <vxe-column  min-width="100px" title="发布者" field="createBy.name" align="center" ></vxe-column>
+<!--            <vxe-column min-width="180px" title="通告时间" field="beginDate" align="center" >-->
+<!--              <template  #default="scope">-->
+<!--                 <span v-if="scope.row.notifyType === '0'">-->
+<!--                   {{commonJS.isNotEmpty(scope.row.beginDate) && commonJS.isNotEmpty(scope.row.endDate)-->
+<!--                   ?-->
+<!--                   moment(scope.row.beginDate).format('YYYY-MM-DD') + " 至 " + moment(scope.row.endDate).format('YYYY-MM-DD')-->
+<!--                   :-->
+<!--                   ''}}-->
+<!--                 </span>-->
+<!--                <span v-else-if="scope.row.notifyType === '1'">-->
+<!--                   长期通告-->
+<!--                 </span>-->
+<!--              </template>-->
+<!--            </vxe-column>-->
+          <vxe-column  min-width="180px" title="创建时间" field="createTime" align="center" ></vxe-column>
+          <vxe-column  width="100px" align="center" fixed="right" title="关闭状态" field="isClose" >
+            <template #default="scope">
+              <span v-if="scope.row.isClose === '0'" style="color: #67C23A"> 未关闭 </span>
+              <span v-else-if="scope.row.isClose === '1'" style="color: #F56C6C"> 已关闭 </span>
+            </template>
+          </vxe-column>
+            <vxe-column  width="100px" align="center" fixed="right" title="状态" field="status" >
+              <template #default="scope">
+                <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
+                            :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
+                  {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
+                </el-button>
+              </template>
+            </vxe-column>
+
+            <vxe-column title="操作" width="120px" fixed="right" align="center">
+                <template  #default="scope">
+                  <el-button v-if="hasPermission('jy_notify:info:edit')&&(scope.row.status === '4')&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="push(scope.row)">驳回调整</el-button>
+                  <el-button v-if="(scope.row.status === '1' || scope.row.status === '3')&& (scope.row.createById === $store.state.user.id || isAdmin)" text type="primary" size="small" @click="edit(scope.row)">修改</el-button>
+                  <el-button v-if="scope.row.status === '5' && scope.row.isClose === '0' && (scope.row.createById === $store.state.user.id || isAdmin)" text type="primary" size="small" @click="close(scope.row.id)">关闭</el-button>
+
+                  <el-button v-if="hasPermission('jy_notify:info:edit')&&(scope.row.status === '2')&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+                  <el-button v-if="hasPermission('jy_notify:info:del')&&(scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3')&&(scope.row.createById === $store.state.user.id || isAdmin)"  text type="primary" size="small" @click="del(scope.row.id)">删除</el-button>
+				</template>
+            </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+        <!-- 弹窗, 新增 / 修改 -->
+    <NotifyForm  ref="notifyForm" @refreshDataList="refreshList"></NotifyForm>
+  </div>
+  </div>
+</template>
+
+<script>
+  import NotifyForm from './NotifyForm'
+  import NotifyService from '@/api/jy/NotifyService'
+  import pick from 'lodash.pick'
+  import taskService from '@/api/flowable/TaskService'
+  import processService from '@/api/flowable/ProcessService'
+  import userService from '@/api/sys/UserService'
+  import UserSelect from '@/components/userSelect'
+
+  export default {
+    data () {
+      return {
+        searchForm: {
+          title: '',
+          type: '',
+          createName: '',
+          createDates: []
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false
+      }
+    },
+    components: {
+      NotifyForm,
+      UserSelect
+    },
+    notifyService: null,
+    created () {
+      this.notifyService = new NotifyService()
+    },
+    activated () {
+      this.refreshList()
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+		  this.createName = this.$store.state.user.name
+		  return this.$store.state.user
+      }
+    },
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.notifyService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('data',data.records)
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+          this.checkIsAdmin()
+          processService.getByName('嘉溢-发起通知').then((data) => {
+            if (!this.commonJS.isEmpty(data.id)) {
+              this.processDefinitionAuditId = data.id
+              this.procDefAuditKey = data.key
+            }
+          })
+        })
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+  // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      close (id) {
+        this.$confirm(`关闭通告后,接收人将无法查阅,确定关闭吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.notifyService.close(id).then((data) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      // 新增
+      add () {
+        this.$refs.notifyForm.init('add', '')
+      },
+            // 修改
+      edit (row) {
+		  let tabTitle = `发起流程【发起通知】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [发起通知]`
+		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+			  businessId: row.id,
+			  businessTable: 'jy_plugin_notify',
+			  status: 'startAndHold'}).then((data) => {
+			  this.$router.push({
+				  path: '/flowable/task/TaskForm',
+				  query: {
+					  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+					  procDefId: this.processDefinitionAuditId,
+					  procDefKey: this.procDefAuditKey,
+					  status: 'startAndHold',
+					  title: tabTitle,
+					  formType: data.formType,
+					  formUrl: data.formUrl,
+					  formTitle: processTitle,
+					  businessId: row.id,
+					  businessTable: 'jy_plugin_notify',
+					  isShow: false,
+					  routePath: '/jy/notify/NotifyList'
+				  }
+			  })
+		  })
+      },
+      // 查看
+      view (id) {
+        this.$refs.notifyForm.init('view', id)
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.notifyTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.notifyService.delete(ids).then((data) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【发起通知】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [发起通知]`
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/jy/notify/NotifyList'
+              }
+            })
+          })
+      },
+      // 发起项目登记
+      push (row) {
+		  this.notifyService.queryById(row.id).then((data) => {
+			  if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+				  this.$message.error('数据已发生改变或不存在,请刷新数据')
+				  this.refreshList()
+			  } else {
+				  this.todo(row)
+			  }
+		  })
+      },
+		// 审核或重新调整跳转
+		todo (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.taskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/jy/notify/NotifyList',   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+      // 查看项目登记流程结果
+      detail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
+                readOnly: true,
+                title: '发起通知' + '流程详情',
+                formTitle: '发起通知' + '流程详情',
+                businessId: row.id,
+                status: 'reback'
+              }
+            })
+          })
+        }
+      },
+      // 撤回项目登记
+      reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.notifyService.queryById(row.id).then((data) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              processService.revokeProcIns(row.procInsId).then((data) => {
+                let form = {status: '3', id: row.id}
+                this.notifyService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      }
+    }
+  }
+</script>
+<style>
+  .box {
+    width: 400px
+  }
+  .box .top {
+    text-align: center;
+  }
+  .box .item {
+    margin: 4px;
+  }
+</style>

+ 680 - 0
src/views/jy/notify/NotifyTaskForm.vue

@@ -0,0 +1,680 @@
+<template>
+  <div>
+      <el-form  :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view' || method === 'read'?'readonly':''" :disabled="method==='view' || method === 'read' || status === 'audit' || status === 'taskFormDetail'"
+               label-width="120px" @submit.native.prevent>
+        <el-row  :gutter="15">
+<!--          <el-col :span="24">-->
+<!--            <el-form-item label="通告状态" prop="notifyType"-->
+<!--                          :rules="[-->
+<!--                  {required: true, message:'通告状态不能为空', trigger:'blur'}-->
+<!--                 ]">-->
+<!--              <el-radio v-model="inputForm.notifyType" v-for="item in $dictUtils.getDictList('oa_notify_status')" :label="item.value" style="margin-right: 20px">-->
+<!--                {{item.label}}</el-radio>-->
+<!--&lt;!&ndash;              <el-select size="medium" @change="changeNotifyType" v-model="inputForm.notifyType" placeholder="请选择"  style="width: 100%;">&ndash;&gt;-->
+<!--&lt;!&ndash;                <el-option&ndash;&gt;-->
+<!--&lt;!&ndash;                  v-for="item in $dictUtils.getDictList('oa_notify_status')"&ndash;&gt;-->
+<!--&lt;!&ndash;                  :key="item.value"&ndash;&gt;-->
+<!--&lt;!&ndash;                  :label="item.label"&ndash;&gt;-->
+<!--&lt;!&ndash;                  :value="item.value">&ndash;&gt;-->
+<!--&lt;!&ndash;                </el-option>&ndash;&gt;-->
+<!--&lt;!&ndash;              </el-select>&ndash;&gt;-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+          <el-col :span="12">
+            <el-form-item label="类型" prop="type"
+                          :rules="[
+                  {required: true, message:'类型不能为空', trigger:'blur'}
+                 ]">
+              <el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">
+                <el-option
+                  v-for="item in $dictUtils.getDictList('oa_notify_type')"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="标题" prop="title"
+                          :rules="[
+                  {required: true, message:'标题不能为空', trigger:'blur'}
+                 ]">
+              <el-input size="medium" v-model="inputForm.title" placeholder="请填写标题"     ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="文号" prop="no"
+                          :rules="[
+                 ]">
+              <el-input size="medium" v-model="inputForm.no" placeholder="请填写文号"     ></el-input>
+            </el-form-item>
+          </el-col>
+<!--          <el-col :span="12" v-if="inputForm.notifyType === '0'">-->
+<!--            <el-form-item label="通告时间" prop="dates"-->
+<!--                          :rules="[-->
+<!--                                {required: true, message:'通告时间不能为空', trigger:'blur'}-->
+<!--                   ]">-->
+<!--              <el-date-picker-->
+<!--				  placement="bottom-start"-->
+<!--				  format="YYYY-MM-DD HH:mm:ss"-->
+<!--				  value-format="YYYY-MM-DD HH:mm:ss"-->
+<!--				  v-model="inputForm.dates"-->
+<!--				  type="datetimerange"-->
+<!--				  range-separator="至"-->
+<!--				  start-placeholder="开始日期"-->
+<!--				  end-placeholder="结束日期"-->
+<!--				  clearable>-->
+<!--              </el-date-picker>-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+          <el-col :span="12">
+            <el-form-item label="创建人" prop="createBy.name"
+                          :rules="[
+                   ]">
+              <el-input size="medium" :disabled="true" v-model="inputForm.createBy.name" placeholder="请填写创建人" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="officeId"
+                          :rules="[
+                   ]">
+				<SelectTree
+					:disabled="true"
+					ref="officeTree"
+					:props="{
+                          value: 'id',             // ID字段名
+                          label: 'name',         // 显示名称
+                          children: 'children'    // 子级字段名
+                        }"
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="inputForm.officeId"
+					:accordion="true"
+					size="large"
+					@getValue="(value) => {inputForm.officeId=value}"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="内容" prop="content"
+                          :rules="[
+                   ]">
+              <WangEditor ref="contentEditor" v-model="inputForm.content" @getUrl="(url, lsUrl) => {
+                        inputForm.editorFilesDTOList.push({temporaryUrl: lsUrl, url: url})
+                        }"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-divider content-position="left">
+          <div style="float:left;"><i class="el-icon-document"></i> 通告范围-部门</div>
+          <div style="float:left;">
+            <el-button style="margin-left: 20px" type="primary"  size="mini" @click="openOfficeChoose" plain>
+              选择
+            </el-button>
+          </div>
+        </el-divider>
+        <el-row  :gutter="15" >
+			<el-col :span="24">
+          <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+            <vxe-table
+              border
+              :column-config="{resizable: true}"
+              show-overflow
+              show-footer
+              :key="tableKeyOffice"
+              ref="officeTable"
+              class="vxe-table-element"
+              :data="inputForm.pluginNotifyOfficesDTOList"
+              style="width: 100%"
+              @cell-click=""
+              @edit-closed=""
+              highlight-current-row
+            >
+              <vxe-table-column align="center" field="officeName" title="部门"></vxe-table-column>
+              <vxe-table-column align="center" title="操作" width="100">
+                <template v-slot="scope">
+                  <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'office')">删除</el-button>
+                </template>
+              </vxe-table-column>
+            </vxe-table>
+          </el-form>
+			</el-col>
+        </el-row>
+
+        <div style="margin-top: 30px">
+          <el-divider content-position="left" >
+            <div style="float: left"><i class="el-icon-document"></i> 通告范围-成员</div>
+            <UserSelectButton ref="userSelectButton" :disabled="status === 'audit' || status === 'taskFormDetail'" @getValue="(value) => {openUserChoose(value)}"></UserSelectButton>
+          </el-divider>
+        </div>
+        <el-row  :gutter="15">
+			<el-col :span="24">
+          <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+            <vxe-table
+              border
+              :column-config="{resizable: true}"
+              show-overflow
+              show-footer
+              :key="tableKeyUser"
+              ref="userTable"
+              class="vxe-table-element"
+              :data="inputForm.pluginNotifyUserDTOList"
+              style=""
+              @cell-click=""
+              @edit-closed=""
+              highlight-current-row
+            >
+              <vxe-table-column align="center" field="userName" title="姓名"></vxe-table-column>
+              <vxe-table-column align="center" field="officeName" title="部门"></vxe-table-column>
+              <vxe-table-column align="center" title="操作" width="100">
+                <template v-slot="scope">
+                  <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'user')">删除</el-button>
+                </template>
+              </vxe-table-column>
+            </vxe-table>
+          </el-form>
+			</el-col>
+        </el-row>
+      </el-form>
+    <!--        附件-->
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <OfficeTreeSelect ref="officeTreeSelect" @getOfficeChoose="getOfficeChoose"></OfficeTreeSelect>
+  </div>
+</template>
+
+<script>
+  import UserSelect from '@/components/userSelect'
+  import NotifyService from '@/api/jy/NotifyService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import WangEditor from '@/components/editor/WangEditor'
+  import OfficeTreeSelect from '@/components/officeTreeSelect'
+  import UserSelectButton from '@/components/userSelectButton/DividerButton'
+  import UserService from '@/api/sys/UserService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '1',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: '',
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: [],
+			pageSize: 3,
+        },
+        keyWatch: '',
+        tableKeyOffice: '',
+        tableKeyUser: ''
+      }
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      UserSelect,
+      SelectTree,
+      WangEditor,
+      OfficeTreeSelect,
+      UserSelectButton,
+      UpLoadComponent
+    },
+    notifyService: null,
+    created () {
+      this.notifyService = new NotifyService()
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '1',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: ['', ''],
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: [],
+			pageSize: 3,
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.$refs.contentEditor.clear()
+          this.notifyService.query({id: this.inputForm.id, isSelf: false,size:this.inputForm.pageSize}).then((data) => {
+            this.$refs.uploadComponent.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+			  console.log('inputForm',this.inputForm)
+			  this.inputForm.pageSize=3
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
+              this.$refs.contentEditor.disable()
+            } else {
+              this.$refs.contentEditor.enable()
+            }
+            // if (this.commonJS.isNotEmpty(this.inputForm.content)) {
+            //   this.$refs.contentEditor.init(this.inputForm.content)
+            // }
+            if (this.commonJS.isEmpty(this.inputForm.editorFilesDTOList)) {
+              this.inputForm.editorFilesDTOList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createBy.id)) {
+              this.inputForm.createBy.id = this.$store.state.user.id
+              this.inputForm.createBy.name = this.$store.state.user.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.officeId)) {
+              this.inputForm.officeId = this.$store.state.user.office.id
+            }
+            this.inputForm.dates = ['', '']
+            if (this.commonJS.isNotEmpty(this.inputForm.beginDate) && this.commonJS.isNotEmpty(this.inputForm.endDate)) {
+              this.inputForm.dates[0] = this.inputForm.beginDate
+              this.inputForm.dates[1] = this.inputForm.endDate
+            }
+            if (this.commonJS.isEmpty(this.inputForm.notifyType)) {
+              this.inputForm.notifyType = '0'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyOfficesDTOList)) {
+              this.inputForm.pluginNotifyOfficesDTOList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.inputForm.pluginNotifyUserDTOList = []
+            }
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
+              this.method = 'view'
+              method = 'view'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'jyNotify',null, null, null, null, false)
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      agreeForm (callback) {
+        this.notifyService.query({
+          id: this.inputForm.id,
+          isSelf: false,
+		  size: this.inputForm.pageSize,
+        }).then((data) => {
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
+          }
+        })
+      },
+      reapplyForm (callback) {
+        this.notifyService.query({
+          id: this.inputForm.id,
+          isSelf: false,
+			size:this.inputForm.pageSize
+        }).then((data) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.doSubmit('reapply', callback)
+          }
+        })
+      },
+      // 表单提交
+      doSubmit (status, callback) {
+        if (status === 'save') {
+          // 暂存
+          this.inputForm.status = '1'
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          if (this.commonJS.isNotEmpty(this.inputForm.dates)) {
+            this.inputForm.beginDate = this.inputForm.dates[0]
+            this.inputForm.endDate = this.inputForm.dates[1]
+          } else {
+            this.inputForm.beginDate = ''
+            this.inputForm.endDate = ''
+          }
+          this.getEditorFilesDTOList()
+          this.notifyService.saveForm(this.inputForm).then((data) => {
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.status = '5'
+        } else if (status === 'reapply') {
+          this.inputForm.status = '2'
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyOfficesDTOList) && this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.$message.error('通告范围(部门或成员),至少填写一项')
+              this.loading = false
+              throw new Error('通告范围(部门或成员),至少填写一项')
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            // if (this.commonJS.isNotEmpty(this.inputForm.dates)) {
+            //   this.inputForm.beginDate = this.inputForm.dates[0]
+            //   this.inputForm.endDate = this.inputForm.dates[1]
+            //   if (this.commonJS.isNotEmpty(this.inputForm.beginDate) && this.commonJS.isNotEmpty(this.inputForm.endDate)) {
+            //     if (this.inputForm.beginDate === this.inputForm.endDate) {
+            //       if (this.inputForm.notifyType === '0') {
+            //         this.$message.error('通告起止时间不可以相同')
+            //         this.loading = false
+            //         throw new Error('通告起止时间不可以相同')
+            //       }
+            //     }
+            //   } else {
+            //     if (this.inputForm.notifyType === '0') {
+            //       this.$message.error('请填写通告时间')
+            //       this.loading = false
+            //       throw new Error('请填写通告时间')
+            //     }
+            //   }
+            // } else {
+            //   this.inputForm.beginDate = ''
+            //   this.inputForm.endDate = ''
+            //   if (this.inputForm.notifyType === '0') {
+            //     this.$message.error('请填写通告时间')
+            //     this.loading = false
+            //     throw new Error('请填写通告时间')
+            //   }
+            // }
+            this.getEditorFilesDTOList()
+            this.notifyService.saveForm(this.inputForm).then((data) => {
+              this.loading = false
+              callback(data.businessTable, data.businessId, this.inputForm)
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      updateStatusById (type, callback) {
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.notifyService.query({
+              id: this.inputForm.id,
+              isSelf: false,
+				size:this.inputForm.pageSize
+            }).then((data) => {
+              if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                  let param = {status: '4', id: this.inputForm.id}
+                  this.notifyService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  let param = {status: '3', id: this.inputForm.id}
+                  this.notifyService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.notifyService.query({
+              id: this.inputForm.id,
+              isSelf: false,
+				size:this.inputForm.pageSize
+            }).then((data) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.notifyService.updateStatusById(param).then(() => {
+					this.loading = false
+                  	callback()
+                })
+              }
+            })
+          }
+        }
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.contentEditor.enable()
+        this.inputForm = {
+          createBy: {
+            id: '',
+            name: ''
+          },
+          createDate: '',
+          id: '',
+          type: '',
+          title: '',
+          content: '',
+          files: '',
+          status: '',
+          remarks: '',
+          notifyType: '',
+          no: '',
+          beginDate: '',
+          endDate: '',
+          dates: '',
+          officeId: '',
+          workAttachmentDtoList: [],
+          pluginNotifyOfficesDTOList: [],
+          pluginNotifyUserDTOList: [],
+          editorFilesDTOList: []
+        }
+      },
+      changeNotifyType () {
+        this.inputForm.beginDate = ''
+        this.inputForm.endDate = ''
+        this.inputForm.dates = ['', '']
+      },
+      daterangeChange (e) {
+        this.$nextTick(() => {
+          this.$forceUpdate()
+        })
+      },
+      getEditorFilesDTOList () {
+        let a = []
+        if (this.commonJS.isNotEmpty(this.inputForm.editorFilesDTOList)) {
+          this.inputForm.content = this.inputForm.content.replace(/&amp;/g, '&')
+          this.inputForm.editorFilesDTOList.forEach((item) => {
+            if (this.inputForm.content.includes(item.temporaryUrl)) {
+              a.push(item)
+            }
+          })
+        }
+        this.inputForm.editorFilesDTOList = []
+        a.forEach((item) => {
+          this.inputForm.editorFilesDTOList.push(item)
+        })
+      },
+      openOfficeChoose () {
+        this.$refs.officeTreeSelect.init()
+      },
+      getOfficeChoose (list) {
+        let _this = this
+        const wait = () => new Promise((resolve, reject) => {
+          if (_this.commonJS.isEmpty(_this.inputForm.pluginNotifyOfficesDTOList)) {
+            _this.inputForm.pluginNotifyOfficesDTOList = []
+            resolve()
+          } else if (_this.commonJS.isEmpty(list)) {
+            resolve()
+          } else {
+            list.forEach((item, index) => {
+              _this.inputForm.pluginNotifyOfficesDTOList.forEach((office, rowIndex) => {
+                if (item.id === office.officeId || item.name === office.officeName) {
+                  this.$refs.officeTable.remove(office)
+                  this.inputForm.pluginNotifyOfficesDTOList.splice(rowIndex, 1)
+                  this.tableKeyOffice = Math.random()
+                }
+              })
+            })
+            resolve()
+          }
+        })
+        wait().then(() => {
+          list.forEach((item) => {
+            let d = {
+              officeName: item.name,
+              officeId: item.id
+            }
+            this.$refs.officeTable.insertAt(d)
+            this.inputForm.pluginNotifyOfficesDTOList.push(d)
+            this.tableKeyOffice = Math.random()
+          })
+        })
+      },
+      removeEvent (row, rowIndex, type) {
+        if (type === 'office') {
+          this.$refs.officeTable.remove(row)
+          this.inputForm.pluginNotifyOfficesDTOList.splice(rowIndex, 1)
+          this.tableKeyOffice = Math.random()
+        }
+        if (type === 'user') {
+          this.$refs.userTable.remove(row)
+          this.inputForm.pluginNotifyUserDTOList.splice(rowIndex, 1)
+          this.tableKeyUser = Math.random()
+        }
+      },
+      openUserChoose (value) {
+        if (this.commonJS.isNotEmpty(value)) {
+        	UserService.queryDetailList(value).then((data) => {
+            if (this.commonJS.isEmpty(this.inputForm.pluginNotifyUserDTOList)) {
+              this.inputForm.pluginNotifyUserDTOList = []
+            }
+            data.forEach(item => {
+              this.inputForm.pluginNotifyUserDTOList.forEach((user, rowIndex) => {
+                if (this.commonJS.isEmpty(item.name) || user.userName === item.name || user.userId === item.id) {
+                  this.$refs.userTable.remove(user)
+                  this.inputForm.pluginNotifyUserDTOList.splice(rowIndex, 1)
+                  this.tableKeyUser = Math.random()
+                }
+              })
+            })
+            data.forEach(item => {
+              let param = {
+                userId: item.id,
+                userName: this.commonJS.isEmpty(item.name) ? '' : item.name,
+                officeName: this.commonJS.isEmpty(item.officeDTO) ? '' : this.commonJS.isEmpty(item.officeDTO.name) ? '' : item.officeDTO.name
+              }
+              this.$refs.userTable.insertAt(param)
+              this.inputForm.pluginNotifyUserDTOList.push(param)
+              this.tableKeyUser = Math.random()
+            })
+          })
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .w-e-menu {
+    z-index: 2 !important;
+  }
+  /deep/ .wtext {
+    height: 400px
+  }
+</style>