|
|
@ -4,10 +4,18 @@
|
|
|
|
<div class="search-area">
|
|
|
|
<div class="search-area">
|
|
|
|
<el-form :model="searchForm" inline>
|
|
|
|
<el-form :model="searchForm" inline>
|
|
|
|
<el-form-item label="提醒名称">
|
|
|
|
<el-form-item label="提醒名称">
|
|
|
|
<el-input v-model="searchForm.rulesName" placeholder="请输入项目名称" clearable />
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="searchForm.rulesName"
|
|
|
|
|
|
|
|
placeholder="请输入项目名称"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提醒类型">
|
|
|
|
<el-form-item label="提醒类型">
|
|
|
|
<el-select v-model="searchForm.alertType" placeholder="全部" clearable>
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="searchForm.alertType"
|
|
|
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-option label="全部" value="" />
|
|
|
|
<el-option label="全部" value="" />
|
|
|
|
<el-option label="申报任务即将结束" value="3" />
|
|
|
|
<el-option label="申报任务即将结束" value="3" />
|
|
|
|
<el-option label="项目即将建设完成" value="2" />
|
|
|
|
<el-option label="项目即将建设完成" value="2" />
|
|
|
@ -23,17 +31,36 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tablebox">
|
|
|
|
<div class="tablebox">
|
|
|
|
<div class="operation-area">
|
|
|
|
<div class="operation-area">
|
|
|
|
<el-button type="primary" @click="handleAdd" icon="el-icon-circle-plus-outline">添加规则</el-button>
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
|
|
|
|
|
>添加规则</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="tableData"
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-table-column type="selection" align="center" />
|
|
|
|
<el-table-column type="selection" align="center" />
|
|
|
|
<el-table-column label="序号" width="80" align="center">
|
|
|
|
<el-table-column label="序号" width="80" align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
{{ scope.$index + 1 }}
|
|
|
|
{{ scope.$index + 1 }}
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="rulesName" label="提醒名称" min-width="200" align="center" />
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="alertType" label="提醒类型" min-width="150" align="center">
|
|
|
|
prop="rulesName"
|
|
|
|
|
|
|
|
label="提醒名称"
|
|
|
|
|
|
|
|
min-width="200"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="alertType"
|
|
|
|
|
|
|
|
label="提醒类型"
|
|
|
|
|
|
|
|
min-width="150"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span v-if="scope.row.alertType === 1">全局自定义通知</span>
|
|
|
|
<span v-if="scope.row.alertType === 1">全局自定义通知</span>
|
|
|
|
<span v-if="scope.row.alertType === 2">项目即将结束(企业)</span>
|
|
|
|
<span v-if="scope.row.alertType === 2">项目即将结束(企业)</span>
|
|
|
@ -41,20 +68,36 @@
|
|
|
|
<span v-if="scope.row.alertType === 4">项目自定义通知</span>
|
|
|
|
<span v-if="scope.row.alertType === 4">项目自定义通知</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="alertRecipients" label="提醒对象" min-width="120" align="center">
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="alertRecipients"
|
|
|
|
|
|
|
|
label="提醒对象"
|
|
|
|
|
|
|
|
min-width="120"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span v-if="scope.row.alertRecipients === 2">政务用户</span>
|
|
|
|
<span v-if="scope.row.alertRecipients === 2">政务用户</span>
|
|
|
|
<span v-if="scope.row.alertRecipients === 1">企业用户</span>
|
|
|
|
<span v-if="scope.row.alertRecipients === 1">企业用户</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="alertManner" label="提醒方式" min-width="120" align="center">
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="alertManner"
|
|
|
|
|
|
|
|
label="提醒方式"
|
|
|
|
|
|
|
|
min-width="120"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span v-if="scope.row.alertManner == 1">定期提醒</span>
|
|
|
|
<span v-if="scope.row.alertManner == 1">定期提醒</span>
|
|
|
|
<span v-if="scope.row.alertManner == 2">不定期提醒</span>
|
|
|
|
<span v-if="scope.row.alertManner == 2">不定期提醒</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="alertTime" label="提醒时间" min-width="180" align="center" />
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="alertTime"
|
|
|
|
|
|
|
|
label="提醒时间"
|
|
|
|
|
|
|
|
min-width="180"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
<!-- <el-table-column
|
|
|
|
prop="createBy"
|
|
|
|
prop="createBy"
|
|
|
|
label="创建人"
|
|
|
|
label="创建人"
|
|
|
@ -63,23 +106,55 @@
|
|
|
|
/> -->
|
|
|
|
/> -->
|
|
|
|
<el-table-column label="操作" width="200" fixed="right" align="center">
|
|
|
|
<el-table-column label="操作" width="200" fixed="right" align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
|
|
|
|
<el-button type="text" @click="handleDetail(scope.row)"
|
|
|
|
<el-button type="text" @click="handleEdit(scope.row)" style="color: #67c23a">修改</el-button>
|
|
|
|
>详情</el-button
|
|
|
|
<el-button type="text" @click="handleDelete(scope.row)" style="color: red">删除</el-button>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="handleEdit(scope.row)"
|
|
|
|
|
|
|
|
style="color: #67c23a"
|
|
|
|
|
|
|
|
>修改</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
|
|
|
style="color: red"
|
|
|
|
|
|
|
|
>删除</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 分页 -->
|
|
|
|
<!-- 分页 -->
|
|
|
|
<pagination v-show="pagination.total > 0" :total="pagination.total" :page.sync="pagination.current"
|
|
|
|
<pagination
|
|
|
|
:limit.sync="pagination.size" @pagination="handleSearch" />
|
|
|
|
v-show="pagination.total > 0"
|
|
|
|
|
|
|
|
:total="pagination.total"
|
|
|
|
|
|
|
|
:page.sync="pagination.current"
|
|
|
|
|
|
|
|
:limit.sync="pagination.size"
|
|
|
|
|
|
|
|
@pagination="handleSearch"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加规则弹框 -->
|
|
|
|
<!-- 添加规则弹框 -->
|
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
|
|
|
|
<el-dialog
|
|
|
|
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" size="small">
|
|
|
|
:title="dialogTitle"
|
|
|
|
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
|
|
|
|
width="600px"
|
|
|
|
|
|
|
|
:before-close="handleClose"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
ref="ruleForm"
|
|
|
|
|
|
|
|
:model="ruleForm"
|
|
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
|
|
label-width="120px"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-form-item label="提醒规则标题" prop="rulesName">
|
|
|
|
<el-form-item label="提醒规则标题" prop="rulesName">
|
|
|
|
<el-input v-model="ruleForm.rulesName" placeholder="请输入提醒规则标题" :disabled="isView" />
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="ruleForm.rulesName"
|
|
|
|
|
|
|
|
placeholder="请输入提醒规则标题"
|
|
|
|
|
|
|
|
:disabled="isView"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提醒对象" prop="alertRecipients">
|
|
|
|
<el-form-item label="提醒对象" prop="alertRecipients">
|
|
|
|
<el-radio-group v-model="ruleForm.alertRecipients" :disabled="isView">
|
|
|
|
<el-radio-group v-model="ruleForm.alertRecipients" :disabled="isView">
|
|
|
@ -100,34 +175,57 @@
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提醒时间" prop="alertTime" v-if="isReminder == 1">
|
|
|
|
<el-form-item label="提醒时间" prop="alertTime" v-if="isReminder == 1">
|
|
|
|
<el-date-picker v-model="ruleForm.alertTime" type="datetime" placeholder="请选择提醒时间"
|
|
|
|
<el-date-picker
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" :disabled="isView" />
|
|
|
|
v-model="ruleForm.alertTime"
|
|
|
|
|
|
|
|
type="datetime"
|
|
|
|
|
|
|
|
placeholder="请选择提醒时间"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
:disabled="isView"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提醒内容" prop="alertType" required v-else>
|
|
|
|
<el-form-item label="提醒内容" prop="alertType" required v-else>
|
|
|
|
<el-radio-group v-model="ruleForm.alertType" :disabled="isView">
|
|
|
|
<el-radio-group v-model="ruleForm.alertType" :disabled="isView">
|
|
|
|
<el-radio label="2">申报任务即将结束(企业)</el-radio>
|
|
|
|
<el-radio label="2">申报任务即将结束(企业)</el-radio>
|
|
|
|
<el-radio label="3">项目即将建设完成(政府)</el-radio>
|
|
|
|
<el-radio label="3">项目即将建设完成(政府)</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
<el-form-item prop="reminderDays" class="reminder-days-item" :rules="[
|
|
|
|
<el-form-item
|
|
|
|
|
|
|
|
prop="reminderDays"
|
|
|
|
|
|
|
|
class="reminder-days-item"
|
|
|
|
|
|
|
|
:rules="[
|
|
|
|
{ required: true, message: '请输入提醒天数', trigger: 'blur' },
|
|
|
|
{ required: true, message: '请输入提醒天数', trigger: 'blur' },
|
|
|
|
]">
|
|
|
|
]"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div style="display: flex; align-items: center">
|
|
|
|
<div style="display: flex; align-items: center">
|
|
|
|
<span style="color: #f56c6c; margin-right: 4px">*</span>
|
|
|
|
<span style="color: #f56c6c; margin-right: 4px">*</span>
|
|
|
|
<span>提前</span>
|
|
|
|
<span>提前</span>
|
|
|
|
<el-input v-model="ruleForm.daysAdvance" type="number" :min="1" :max="30" size="small"
|
|
|
|
<el-input
|
|
|
|
style="width: 80px; margin: 0 8px" :disabled="isView" />
|
|
|
|
v-model="ruleForm.daysAdvance"
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
:min="1"
|
|
|
|
|
|
|
|
:max="30"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
style="width: 80px; margin: 0 8px"
|
|
|
|
|
|
|
|
:disabled="isView"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<span>天提醒</span>
|
|
|
|
<span>天提醒</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提醒内容" prop="alertContent">
|
|
|
|
<el-form-item label="提醒内容" prop="alertContent">
|
|
|
|
<el-input v-model="ruleForm.alertContent" type="textarea" :rows="4" placeholder="请输入提醒内容"
|
|
|
|
<el-input
|
|
|
|
:disabled="isView" />
|
|
|
|
v-model="ruleForm.alertContent"
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
:rows="4"
|
|
|
|
|
|
|
|
placeholder="请输入提醒内容"
|
|
|
|
|
|
|
|
:disabled="isView"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="cancelAdd">取 消</el-button>
|
|
|
|
<el-button @click="cancelAdd">取 消</el-button>
|
|
|
|
<el-button v-if="!isView" type="primary" @click="submitForm('ruleForm')">确 定</el-button>
|
|
|
|
<el-button v-if="!isView" type="primary" @click="submitForm('ruleForm')"
|
|
|
|
|
|
|
|
>确 定</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -225,7 +323,7 @@ export default {
|
|
|
|
alertTime: "",
|
|
|
|
alertTime: "",
|
|
|
|
alertContent: "",
|
|
|
|
alertContent: "",
|
|
|
|
alertType: "1",
|
|
|
|
alertType: "1",
|
|
|
|
daysAdvance: ""
|
|
|
|
daysAdvance: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 清除验证
|
|
|
|
// 清除验证
|
|
|
@ -243,13 +341,13 @@ export default {
|
|
|
|
const params = {
|
|
|
|
const params = {
|
|
|
|
current: this.pagination.current,
|
|
|
|
current: this.pagination.current,
|
|
|
|
size: this.pagination.size,
|
|
|
|
size: this.pagination.size,
|
|
|
|
rulesName: this.searchForm.rulesName || '',
|
|
|
|
rulesName: this.searchForm.rulesName || "",
|
|
|
|
alertType: this.searchForm.alertType || '',
|
|
|
|
alertType: this.searchForm.alertType || "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 移除空字符串的参数
|
|
|
|
// 移除空字符串的参数
|
|
|
|
Object.keys(params).forEach(key => {
|
|
|
|
Object.keys(params).forEach((key) => {
|
|
|
|
if (params[key] === '') {
|
|
|
|
if (params[key] === "") {
|
|
|
|
delete params[key];
|
|
|
|
delete params[key];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -282,6 +380,7 @@ export default {
|
|
|
|
alertType: res.data.alertType.toString(),
|
|
|
|
alertType: res.data.alertType.toString(),
|
|
|
|
daysAdvance: res.data.daysAdvance,
|
|
|
|
daysAdvance: res.data.daysAdvance,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.isView = true;
|
|
|
|
this.isView = true;
|
|
|
|
this.dialogVisible = true;
|
|
|
|
this.dialogVisible = true;
|
|
|
|
this.dialogTitle = "查看智能提醒规则";
|
|
|
|
this.dialogTitle = "查看智能提醒规则";
|
|
|
@ -308,7 +407,7 @@ export default {
|
|
|
|
alertTime: "",
|
|
|
|
alertTime: "",
|
|
|
|
alertContent: "",
|
|
|
|
alertContent: "",
|
|
|
|
alertType: "1",
|
|
|
|
alertType: "1",
|
|
|
|
daysAdvance: "" // 确保这个字段也被重置
|
|
|
|
daysAdvance: "", // 确保这个字段也被重置
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 清除验证
|
|
|
|
// 清除验证
|
|
|
|