123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <div class="notificationDetail">
- <el-dialog title="公告详情" custom-class="startToDia" v-model="dialogVisible" width="900px" :close-on-click-modal="false">
- <div class="notifcaFrom">
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
- <el-form-item label="公告标题" prop="noticeTitle">
- <el-input v-model="ruleForm.noticeTitle" placeholder="请输入公告标题" />
- </el-form-item>
- <el-form-item label="公告内容" prop="noticeContent">
- <el-input v-model="ruleForm.noticeContent"
- type="textarea" :rows="10" placeholder="请输入公告内容"></el-input>
- </el-form-item>
- <el-form-item label="发布对象" prop="sendTo">
- <el-select v-model="ruleForm.sendTo" placeholder="请选择发布对象">
- <el-option
- v-for="item in sendToData"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-row>
- <el-col :span="12" v-if="ruleForm.sendTo === '个别部门'">
- <el-form-item label="个别部门" prop="sendToContent">
- <el-select v-model="ruleForm.sendToContent" multiple collapse-tags placeholder="请选择部门">
- <el-option
- v-for="item in departData"
- :key="item.id"
- :label="item.keyName"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="排序">
- <el-input-number v-model="ruleForm.serialNumber" :min="1" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item label="附件">
- <div class="fliesHeader">
- <span>附件名</span>
- <span>发送单位</span>
- <span>操作</span>
- </div>
- <div v-for="it in filesListEdit" :key="it">
- <div class="fliesMain">
- <div>
- <img :src="file" style="margin-right: 10px" >
- <span class="fliesMainSpan spanOne">{{it}}</span>
- </div>
- <span class="fliesMainSpan spanTwo" style="font-size:14px">{{it.releaseDeptName}}</span>
- {{userMes.unitName}}
- <div class="fileOperate">
- <div @click="previewFile(it)" style="cursor:pointer">
- <img :src="yulan" style="margin-right: 10px;" >
- <span style="font-size:14px">预览</span>
- </div>
- </div>
- </div>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import yulan from '../../assets/btnIcon/yulan.png'
- import fileDelete from '../../assets/btnIcon/fileDelete.png'
- export default {
- data() {
- return {
- dialogVisible: false,
- ruleForm: {
- serialNumber: 1,
- noticeTitle: '',
- noticeContent: '',
- sendTo: '',
- sendToContent: [],
- releaseDept: '',
- releasePeople: '',
- },
- filesListEdit: [],
- yulan: yulan,
- fileDelete: fileDelete
- }
- },
- methods: {
- init(row) {
- this.dialogVisible = true
- this.filesListEdit = []
- this.ruleForm = {
- serialNumber: row.serialNumber*1,
- noticeTitle: row.noticeTitle,
- noticeContent: row.noticeContent,
- sendTo: row.sendTo,
- sendToContent: row.sendToContent.split(','),
- releaseDept: row.releaseDept,
- releasePeople: row.releasePeople
- }
- let filesArr = row.noticeAnnex.split(',')
- this.filesListEdit = filesArr
- },
- }
- }
- </script>
- <style lang="less">
- .notificationDetail{
- .el-overlay{
- .startToDia{
- margin-top: 5vh;
- background: #EDEFF5;
- .el-dialog__body{
- padding: 30px 60px 30px 20px !important;
- .notifcaFrom{
- .el-select, .el-input{
- width: 100%;
- }
- .el-input{
- height: 30px;
- }
- .uploadFiles{
- .el-button{
- height: 25px !important;
- }
- }
- .fliesHeader{
- width: 100%;
- display: flex;
- justify-content: space-around;
- span{
- font-size: 14px;
- }
- }
- .fliesMain{
- width: 100%;
- display: flex;
- .fliesMainSpan{
- display: inline-block;
- width: 260px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .spanOne{
- color: #1063CB;
- font-size: 14px;
- }
- .fileOperate{
- width: 160px;
- display: flex;
- justify-content: space-around;
- .removeImg{
- margin-right: 10px;
- position: relative;
- top: 2px;
- }
- }
- .removeDiv{
- width: 160px;
- .removeImg{
- margin: 0 10px 0 20px;
- position: relative;
- top: 3px;
- }
- }
- }
- }
- .flowSty{
- width: 100%;
- height: 70vh;
- }
- }
- .el-dialog__footer{
- background: #fff;
- border-radius: 0 0 10px 10px;
- text-align: left;
- .notificationFooter{
- margin-left: 20px;
- .el-button{
- height: 30px !important;
- }
- }
- }
- }
- }
- }
- </style>
|