Browse Source

消息管理

jly/task002
tianq 3 years ago
parent
commit
db1373f0db
  1. 69
      src/views/modules/workSys/addFormNotice.vue
  2. 25
      src/views/modules/workSys/noticeList.vue

69
src/views/modules/workSys/addFormNotice.vue

@ -6,7 +6,7 @@
<span v-if="pageType == 'view'">查看</span> <span v-if="pageType == 'view'">查看</span>
</span> </span>
<div> <div>
<div class="dialog-h-content2 scroll-h"> <div class="dialog-h-content2 ">
<el-form :inline="true" :model="formData" ref="form" :rules="dataRule" v-if="pageType != 'view'"> <el-form :inline="true" :model="formData" ref="form" :rules="dataRule" v-if="pageType != 'view'">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -35,25 +35,24 @@
<el-input <el-input
v-model="formData.content" v-model="formData.content"
type="textarea" type="textarea"
:autosize="{ minRows:4, maxRows:10}" :autosize="{ minRows: 6, maxRows: 20 }"
:disabled="disabled" maxlength="500"
style="width:500px;" style="width:570px;"
clearable clearable
placeholder="请输入" placeholder="请输入"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div id="app_event" class="div_map"></div>
</el-form> </el-form>
<el-form :inline="false" :model="formData" ref="form" label-width="140px" v-if="pageType == 'view'"> <el-form :inline="false" :model="formData" ref="form" label-width="140px" v-if="pageType == 'view'">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="24">
<el-form-item label="发布渠道" prop="publishDitch">{{ formData.publishDitch }}</el-form-item> <el-form-item label="发布渠道" prop="publishDitch"><span v-if="formData.publishDitch == 0">专属钉钉</span></el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="24">
<el-form-item label="发布范围" prop="publishRangeName">{{ formData.publishRangeName }}</el-form-item> <el-form-item label="发布范围" prop="publishRangeName">{{ formData.publishRangeName }}</el-form-item>
</el-col> </el-col>
@ -63,11 +62,10 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="div_btn" v-if="pageType != 'view'" style="text-align: center;">
<div class="div_btn" v-if="pageType != 'view'">
<el-button size="small" @click="handleCancle"> </el-button> <el-button size="small" @click="handleCancle"> </el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> --> <!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm"> </el-button> <el-button size="small" type="primary" @click="handleComfirm"> </el-button>
</div> </div>
</div> </div>
</div> </div>
@ -100,10 +98,10 @@ export default {
type: Boolean, type: Boolean,
default: '' default: ''
}, },
defaultData: { // defaultData: {
type: Object, // type: Object,
default: null // default: null
}, // },
pageType: { pageType: {
type: String, type: String,
default: '' default: ''
@ -111,15 +109,15 @@ export default {
detailId: { detailId: {
type: String, type: String,
default: '' default: ''
},
detailData: {
type: Object,
default: null
},
disabled: {
type: Boolean,
default: false
} }
// detailData: {
// type: Object,
// default: null
// },
// disabled: {
// type: Boolean,
// default: false
// }
}, },
data() { data() {
@ -136,7 +134,7 @@ export default {
orgOptions: [], // orgOptions: [], //
orgOptionProps: { orgOptionProps: {
// //
multiple: false, multiple: true,
value: 'agencyId', value: 'agencyId',
label: 'agencyName', label: 'agencyName',
children: 'subAgencyList', children: 'subAgencyList',
@ -199,8 +197,14 @@ export default {
}); });
}, },
handleChangeAgency(val) { handleChangeAgency(val) {
let obj = this.$refs['myCascader'].getCheckedNodes()[0].data; console.log('val', val);
this.formData.orgType= obj.level let obj = this.$refs['myCascader'].getCheckedNodes().map(item => {
return { orgType: item.data.level, orgId: item.data.agencyId };
});
console.log('obj', obj);
this.formData.rangeList = [...obj];
// let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
// this.formData.orgType= obj.level
// if (obj) { // if (obj) {
// this.orgType = obj.level === 'grid' ? 'grid' : 'agency'; // this.orgType = obj.level === 'grid' ? 'grid' : 'agency';
// } else { // } else {
@ -223,10 +227,11 @@ export default {
async save() { async save() {
// this.formData.agencyId = this.agencyId; // this.formData.agencyId = this.agencyId;
this.formData.rangeList={ // this.formData.rangeList=[{
orgId:this.formData.orgId, // orgId:this.formData.orgId,
orgType:this.formData.orgType // orgType:this.formData.orgType
} // }]
var url = ''; var url = '';
var params = {}; var params = {};
url = '/message/organization/message/publish'; url = '/message/organization/message/publish';
@ -314,7 +319,7 @@ export default {
} }
} }
/deep/.dialog-h-content2 { /deep/.dialog-h-content2 {
max-height: calc(83vh - 90px); // max-height: calc(83vh - 90px);
box-sizing: border-box; box-sizing: border-box;
padding: 0 10px; padding: 0 10px;
overflow: auto; overflow: auto;

25
src/views/modules/workSys/noticeList.vue

@ -41,8 +41,8 @@
</el-form> </el-form>
</div> </div>
<div class="div_table"> <div class="div_table">
<div class="div_btn"><el-button style="" class="diy-button--reset" size="small" @click="add()">发布</el-button></div> <div class="div_btn"><el-button style="" class="diy-button--add" size="small" @click="add()">发布</el-button></div>
<div style="padding: 0 10px">
<el-table <el-table
class="table" class="table"
ref="ref_table" ref="ref_table"
@ -77,17 +77,8 @@
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
<div>
<addForm
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:pageType="pageType"
:disabled="disabled"
:detailId="detailId"
:detailData="detailData"
@handleClose="handleClose"
/>
</div> </div>
<div><addForm v-if="dialogVisible" :dialogVisible="dialogVisible" :pageType="pageType" :detailId="detailId" @handleClose="handleClose" /></div>
</div> </div>
</template> </template>
@ -100,7 +91,7 @@ let loading; // 加载动画
export default { export default {
data() { data() {
return { return {
dialogVisible:false, dialogVisible: false,
loading: false, loading: false,
total: 0, total: 0,
pageSize: 20, pageSize: 20,
@ -136,7 +127,7 @@ export default {
tableData: [] tableData: []
}; };
}, },
components: {addForm}, components: { addForm },
async mounted() { async mounted() {
// //
@ -169,7 +160,7 @@ export default {
add() { add() {
this.dialogVisible = true; this.dialogVisible = true;
this.pageType = 'add'; this.pageType = 'add';
// this.detailId = row.messageId; this.detailId = '';
// this.detailData = row; // this.detailData = row;
}, },
show(row) { show(row) {
@ -182,7 +173,7 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
this.pageType = 'list'; this.pageType = 'list';
this.detailId = ''; this.detailId = '';
this.getTableData(); this.loadTable();
}, },
getOrgTreeList() { getOrgTreeList() {
const { user } = this.$store.state; const { user } = this.$store.state;
@ -263,7 +254,7 @@ export default {
}; };
this.timeRange = []; this.timeRange = [];
this.pageNo = 0; this.pageNo = 0;
// this.loadTable() this.loadTable()
}, },
handleSizeChange(val) { handleSizeChange(val) {

Loading…
Cancel
Save