|
@@ -6,7 +6,7 @@
|
|
<el-form
|
|
<el-form
|
|
:inline="true"
|
|
:inline="true"
|
|
:model="formSearch"
|
|
:model="formSearch"
|
|
- label-position="right"
|
|
|
|
|
|
+ label-position="left"
|
|
label-width="70px"
|
|
label-width="70px"
|
|
>
|
|
>
|
|
<el-form-item label="标题" class="pull-left">
|
|
<el-form-item label="标题" class="pull-left">
|
|
@@ -33,8 +33,8 @@
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
-
|
|
|
|
- <span>操作:</span>
|
|
|
|
|
|
+ <div class="block-seperator"></div>
|
|
|
|
+ <span>批量操作:</span>
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
type="danger"
|
|
type="danger"
|
|
@@ -66,7 +66,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-popover
|
|
<el-popover
|
|
:title="getRuleTypeName(scope.row.ruleType)"
|
|
:title="getRuleTypeName(scope.row.ruleType)"
|
|
- trigger="click"
|
|
|
|
|
|
+ trigger="hover"
|
|
placement="top-start"
|
|
placement="top-start"
|
|
width="200px"
|
|
width="200px"
|
|
>
|
|
>
|
|
@@ -83,9 +83,9 @@
|
|
|
|
|
|
<!-- <p v-html="getPublishObject(scope.row.publishObject)"></p> -->
|
|
<!-- <p v-html="getPublishObject(scope.row.publishObject)"></p> -->
|
|
<div slot="reference" style="text-align:left">
|
|
<div slot="reference" style="text-align:left">
|
|
- <el-tag size="medium">{{
|
|
|
|
- getRuleTypeName(scope.row.ruleType)
|
|
|
|
- }}</el-tag>
|
|
|
|
|
|
+ <!-- <el-tag size="medium"> -->
|
|
|
|
+ {{ getPublishObject(scope.row.publishObject) }}
|
|
|
|
+ <!-- </el-tag> -->
|
|
</div>
|
|
</div>
|
|
</el-popover>
|
|
</el-popover>
|
|
</template>
|
|
</template>
|
|
@@ -111,24 +111,6 @@
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
<div slot-scope="scope">
|
|
<div slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
- v-show="scope.row.publishStatus == 'UNPUBLISHED'"
|
|
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- plain
|
|
|
|
- @click="editNoticeDialog(scope.row)"
|
|
|
|
- >编辑</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-show="scope.row.publishStatus == 'UNPUBLISHED'"
|
|
|
|
- size="mini"
|
|
|
|
- type="danger"
|
|
|
|
- @click="deleteById(scope.row)"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-show="scope.row.publishStatus != 'UNPUBLISHED'"
|
|
|
|
size="mini"
|
|
size="mini"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-view"
|
|
icon="el-icon-view"
|
|
@@ -136,6 +118,34 @@
|
|
@click="viewNoticeDialog(scope.row)"
|
|
@click="viewNoticeDialog(scope.row)"
|
|
>详情</el-button
|
|
>详情</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-dropdown style="margin-left: 10px;">
|
|
|
|
+ <el-button type="primary" plain size="mini">
|
|
|
|
+ 更多 <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item>
|
|
|
|
+ <el-button
|
|
|
|
+ :disabled="scope.row.publishStatus != 'UNPUBLISHED'"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ plain
|
|
|
|
+ @click="editNoticeDialog(scope.row)"
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>
|
|
|
|
+ <el-button
|
|
|
|
+ :disabled="scope.row.publishStatus != 'UNPUBLISHED'"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="deleteById(scope.row)"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
</div>
|
|
</div>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -155,7 +165,8 @@
|
|
<!-- 弹出窗口 -->
|
|
<!-- 弹出窗口 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
width="700px"
|
|
width="700px"
|
|
- title="编辑公告"
|
|
|
|
|
|
+ :title="this.operateType == 'add' ? '新增' : '编辑' + '公告'"
|
|
|
|
+ v-if="editNoticeDialogVisible"
|
|
:visible.sync="editNoticeDialogVisible"
|
|
:visible.sync="editNoticeDialogVisible"
|
|
:before-close="handleClose"
|
|
:before-close="handleClose"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
@@ -726,7 +737,7 @@ export default {
|
|
this.noticeForm = {};
|
|
this.noticeForm = {};
|
|
},
|
|
},
|
|
editNoticeDialog(row) {
|
|
editNoticeDialog(row) {
|
|
- this.operateType = "modify";
|
|
|
|
|
|
+ this.operateType = "edit";
|
|
this.noticeForm = Object.assign({}, row);
|
|
this.noticeForm = Object.assign({}, row);
|
|
if (row.publishObject && row.publishObject.length > 0) {
|
|
if (row.publishObject && row.publishObject.length > 0) {
|
|
if (row.ruleType == "STUDENTS_OF_EXAM") {
|
|
if (row.ruleType == "STUDENTS_OF_EXAM") {
|
|
@@ -766,6 +777,12 @@ export default {
|
|
for (let po of publishObjectList) {
|
|
for (let po of publishObjectList) {
|
|
strName += po.name + ";";
|
|
strName += po.name + ";";
|
|
}
|
|
}
|
|
|
|
+ if (strName.lastIndexOf(";") == strName.length - 1) {
|
|
|
|
+ strName = strName.substring(0, strName.length - 1);
|
|
|
|
+ }
|
|
|
|
+ if (strName.length > 15) {
|
|
|
|
+ strName = strName.substr(0, 15) + "...";
|
|
|
|
+ }
|
|
return strName;
|
|
return strName;
|
|
},
|
|
},
|
|
getRuleTypeName(ruleType) {
|
|
getRuleTypeName(ruleType) {
|
|
@@ -842,7 +859,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//修改
|
|
//修改
|
|
- if ("modify" == this.operateType) {
|
|
|
|
|
|
+ if ("edit" == this.operateType) {
|
|
this.$httpWithMsg
|
|
this.$httpWithMsg
|
|
.post(EXAM_WORK_API + "/notice/updateNotice", this.noticeForm)
|
|
.post(EXAM_WORK_API + "/notice/updateNotice", this.noticeForm)
|
|
.then(
|
|
.then(
|