|
|
|
@ -1,11 +1,11 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="L-public-main" id="L-size-main" v-if="false">
|
|
|
|
|
<div class="L-public-main" id="L-size-main">
|
|
|
|
|
<div class="L-main">
|
|
|
|
|
<header id="L-header">
|
|
|
|
|
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" ref="queryFrom">
|
|
|
|
|
<el-col :span="22">
|
|
|
|
|
<el-form-item label="规则名称:" prop="enterpriseName">
|
|
|
|
|
<el-input v-model.trim="formInline.enterpriseName" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-form-item label="规则名称:" prop="rulesName">
|
|
|
|
|
<el-input v-model.trim="formInline.rulesName" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')">重置</el-button>
|
|
|
|
@ -20,17 +20,29 @@
|
|
|
|
|
</header>
|
|
|
|
|
<section>
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" :height="tabHeader" :max-height="tabHeader">
|
|
|
|
|
<el-table-column label="规则名称" prop="enterpriseName" />
|
|
|
|
|
<el-table-column label="提醒对象" prop="enterpriseCode" />
|
|
|
|
|
<el-table-column label="提醒方式" prop="contactName" />
|
|
|
|
|
<el-table-column label="提醒时间" prop="contactOffice" />
|
|
|
|
|
<el-table-column label="修改时间" prop="contactPhone" />
|
|
|
|
|
<el-table-column label="规则名称" prop="rulesName" />
|
|
|
|
|
<el-table-column label="提醒对象" prop="alertRecipients">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.alertRecipients == 1 ? "企业用户" : scope.row.alertRecipients == 2 ? "政务用户" : "" }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="提醒方式" prop="alertManner">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.alertManner == 1 ? "定期提醒" : scope.row.alertManner == 2 ? "不定期提醒" : "" }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="提醒时间" prop="alertTime">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.alertManner == 1 ? scope.row.alertTime : scope.row.alertManner == 2 ? scope.row.daysAdvance + '天' : "" }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="修改时间" prop="updateTime" />
|
|
|
|
|
<!-- <el-table-column label="常用联系人邮箱" prop="contactEmail" /> -->
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation" width="180px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="look-info" @click="goInfo(scope.row)">查看详情</span>
|
|
|
|
|
<span class="edit-info" @click="editInfo(scope.row)" v-hasRole="['ent']">修改</span>
|
|
|
|
|
<span class="del-info" @click="delInfo(scope.row)" v-hasRole="['ent']">删除</span>
|
|
|
|
|
<span class="edit-info" @click="editInfo(scope.row)">修改</span>
|
|
|
|
|
<span class="del-info" @click="delInfo(scope.row)" v-if="scope.row.alertManner == 1">删除</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -44,39 +56,80 @@
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
<my-dialog :title="title" @close="importClose" @confirm="confirm" ref="importProject" closeText="关闭" :myclass="true">
|
|
|
|
|
<el-form :model="addFrom" size="small" ref="importFrom" label-width="180px" :rules="rules" class="newArticle" :disabled="title == '查看常用联系人' ? true : false">
|
|
|
|
|
<my-dialog :title="title" @close="importClose" @confirm="confirm" ref="importProject" closeText="关闭" width="40%" :myclass="true">
|
|
|
|
|
<el-form :model="addFrom" size="small" ref="importFrom" label-width="180px" :rules="rules" class="newArticle" :disabled="title == '查看智能提醒规则' ? true : false">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="提醒规则标题" class="importFormItem">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterpriseCode" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-form-item label="提醒规则标题" class="importFormItem" prop="rulesName">
|
|
|
|
|
<el-input v-model.trim="addFrom.rulesName" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="企业名称:" class="importFormItem">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterpriseName" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-form-item label="提醒对象:" class="importFormItem" prop="alertRecipients">
|
|
|
|
|
<el-radio-group v-model="addFrom.alertRecipients" :disabled="title == '修改智能提醒规则' ? true : false">
|
|
|
|
|
<el-radio :label="2">政务用户</el-radio>
|
|
|
|
|
<el-radio :label="1">企业用户</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="常用联系人名称:" class="importFormItem" prop="contactName">
|
|
|
|
|
<el-input v-model.trim="addFrom.contactName" placeholder="请输入常用联系人名称"></el-input>
|
|
|
|
|
<el-form-item label="提醒方式:" class="importFormItem" prop="alertManner">
|
|
|
|
|
<el-radio-group v-model="addFrom.alertManner" disabled>
|
|
|
|
|
<el-radio :label="1">定期提醒</el-radio>
|
|
|
|
|
<el-radio :label="2">不定期提醒</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="常用联系人公司职务:" class="importFormItem" prop="contactOffice">
|
|
|
|
|
<el-input v-model.trim="addFrom.contactOffice" placeholder="请输入常用联系人公司职务"></el-input>
|
|
|
|
|
<el-col :span="24" v-if="addFrom.alertManner == 1">
|
|
|
|
|
<!-- :rules="form.isTime == 0 ? rules.reportTime : [
|
|
|
|
|
{required: false, message: '请选择填报时间', trigger: 'change' }]" -->
|
|
|
|
|
<el-form-item label="提醒时间:" prop="alertTime" class="importFormItem"
|
|
|
|
|
:rules="addFrom.alertManner == 1 ? rules.alertTime : [
|
|
|
|
|
{required: false, message: '请选择填报时间', trigger: 'change' }]"
|
|
|
|
|
>
|
|
|
|
|
<!-- range-separator="-"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期" -->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="addFrom.alertTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
placeholder="选择日期"
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="常用联系人手机号码:" class="importFormItem" prop="contactPhone">
|
|
|
|
|
<el-input v-model.trim="addFrom.contactPhone" placeholder="请输入常用联系人手机号码"></el-input>
|
|
|
|
|
<el-col :span="24" v-if="addFrom.alertManner == 2">
|
|
|
|
|
<el-form-item label="提醒内容:" prop="daysAdvance" class="importFormItem"
|
|
|
|
|
:rules="addFrom.alertManner == 2 ? rules.daysAdvance : [
|
|
|
|
|
{required: false, message: '请选择填报时间', trigger: 'change' }]"
|
|
|
|
|
>
|
|
|
|
|
<div class="intelligentReminder_radio">
|
|
|
|
|
<el-radio-group v-model="addFrom.alertType" disabled>
|
|
|
|
|
<el-radio :label="1">申报任务即将结束(企业)</el-radio>
|
|
|
|
|
<el-radio :label="2">项目即将建设完成(政府)</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
<div class="intelligentReminder_text"><span>*</span>提前<el-input-number v-model="addFrom.daysAdvance" :min="1" :controls="false"></el-input-number>天提醒</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="提醒内容:" class="importFormItem" prop="alertContent">
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
resize="none"
|
|
|
|
|
:rows="3"
|
|
|
|
|
placeholder="请输入提醒内容"
|
|
|
|
|
v-model="addFrom.alertContent">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
<el-form-item label="常用联系人邮箱:" class="importFormItem" prop="contactEmail">
|
|
|
|
|
<el-input v-model.trim="addFrom.contactEmail" placeholder="请输入常用联系人邮箱"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</my-dialog>
|
|
|
|
@ -85,7 +138,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue"
|
|
|
|
|
import myDialog from "@/views/components/myDialog/index.vue"
|
|
|
|
|
import { getJEnterpriseContact, jEnterpriseContactNew, jEnterpriseContactChange, jEnterpriseContactId, jEnterpriseContactDel } from "@/api/jin_ji_hu/infoMaintain"
|
|
|
|
|
import { getjSmartReminders, jSmartRemindersNew, jSmartRemindersChange, jSmartRemindersId, jSmartRemindersDel } from "@/api/jin_ji_hu/intelligentReminder"
|
|
|
|
|
export default {
|
|
|
|
|
components:{myPagination, myDialog},
|
|
|
|
|
data() {
|
|
|
|
@ -97,32 +150,38 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
loading:false,
|
|
|
|
|
formInline: {
|
|
|
|
|
enterpriseName: '',
|
|
|
|
|
enterpriseCode:"",
|
|
|
|
|
rulesName: '',
|
|
|
|
|
},
|
|
|
|
|
tableData:[],
|
|
|
|
|
tabHeader: undefined,
|
|
|
|
|
addFrom: {
|
|
|
|
|
contactName:"",
|
|
|
|
|
contactOffice:"",
|
|
|
|
|
contactPhone:"",
|
|
|
|
|
contactEmail:"",
|
|
|
|
|
enterpriseCode:"",
|
|
|
|
|
enterpriseName:"",
|
|
|
|
|
rulesName:"",
|
|
|
|
|
alertRecipients: 2,
|
|
|
|
|
alertManner: 1,
|
|
|
|
|
alertTime:"",
|
|
|
|
|
alertContent:"",
|
|
|
|
|
daysAdvance: null,
|
|
|
|
|
alertType: 1,
|
|
|
|
|
},
|
|
|
|
|
rules:{
|
|
|
|
|
contactName:[
|
|
|
|
|
{ required: true, message: '请填写常用联系人姓名', trigger: 'blur' }
|
|
|
|
|
rulesName:[
|
|
|
|
|
{ required: true, message: '请填写提醒规则标题', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
contactOffice:[
|
|
|
|
|
{ required: true, message: '请填写常用联系人公司职务', trigger: 'blur' }
|
|
|
|
|
alertRecipients:[
|
|
|
|
|
{ required: true, message: '请选择提醒对象', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
contactPhone:[
|
|
|
|
|
{ required: true, message: '请填写常用联系人手机号码', trigger: 'blur' },
|
|
|
|
|
alertManner:[
|
|
|
|
|
{ required: true, message: '请选择提醒方式', trigger: 'change' },
|
|
|
|
|
],
|
|
|
|
|
contactEmail:[
|
|
|
|
|
{ required: true, message: '请填写常用联系人邮箱', trigger: 'blur' },
|
|
|
|
|
alertTime:[
|
|
|
|
|
{ required: true, message: '请选择日期', trigger: 'change' },
|
|
|
|
|
],
|
|
|
|
|
alertContent:[
|
|
|
|
|
{ required: true, message: '请填写提醒内容', trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
daysAdvance:[
|
|
|
|
|
{ required: true, message: '请填写期限', trigger: 'blur' },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
title:"新增智能提醒规则",
|
|
|
|
|
infoVisible:false,
|
|
|
|
@ -131,6 +190,7 @@ export default {
|
|
|
|
|
mounted() {
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
@ -139,7 +199,7 @@ export default {
|
|
|
|
|
// 列表获取
|
|
|
|
|
getList(){
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getJEnterpriseContact(this.pagination).then(res=>{
|
|
|
|
|
getjSmartReminders(this.pagination).then(res=>{
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.tableData = res.data.records;
|
|
|
|
@ -181,8 +241,6 @@ export default {
|
|
|
|
|
// 新增联系人
|
|
|
|
|
importBtn(){
|
|
|
|
|
this.title = "新增智能提醒规则";
|
|
|
|
|
this.addFrom.enterpriseCode = this.name;
|
|
|
|
|
this.addFrom.enterpriseName = this.nickName;
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
},
|
|
|
|
|
// 关闭事件触发
|
|
|
|
@ -191,17 +249,24 @@ export default {
|
|
|
|
|
this.$refs.importFrom.resetFields();
|
|
|
|
|
this.$refs.importProject.close();
|
|
|
|
|
this.addFrom = {
|
|
|
|
|
contactName:"",
|
|
|
|
|
contactOffice:"",
|
|
|
|
|
contactPhone:"",
|
|
|
|
|
contactEmail:"",
|
|
|
|
|
// ruleTitle:"",
|
|
|
|
|
// content:"",
|
|
|
|
|
// contactPhone:"",
|
|
|
|
|
// contactEmail:"",
|
|
|
|
|
ruleTitle:"",
|
|
|
|
|
alertRecipients: 2,
|
|
|
|
|
alertManner: 1,
|
|
|
|
|
alertTime:"",
|
|
|
|
|
alertContent:"",
|
|
|
|
|
daysAdvance: null,
|
|
|
|
|
alertType: 1,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(row){
|
|
|
|
|
this.title = "查看智能提醒规则"
|
|
|
|
|
jEnterpriseContactId(row.id).then((res=>{
|
|
|
|
|
jSmartRemindersId(row.id).then((res=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
@ -213,7 +278,7 @@ export default {
|
|
|
|
|
this.title = "修改智能提醒规则"
|
|
|
|
|
// this.addFrom.enterpriseCode = this.name;
|
|
|
|
|
// this.addFrom.enterpriseName = this.nickName;
|
|
|
|
|
jEnterpriseContactId(row.id).then((res)=>{
|
|
|
|
|
jSmartRemindersId(row.id).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
@ -224,30 +289,34 @@ export default {
|
|
|
|
|
confirm(){
|
|
|
|
|
this.$refs.importFrom.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// console.log(this.addFrom);
|
|
|
|
|
let id = this.addFrom.id ? this.addFrom.id : null;
|
|
|
|
|
if(id) {
|
|
|
|
|
jEnterpriseContactChange(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(this.title == "查看智能提醒规则") {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
} else {
|
|
|
|
|
jEnterpriseContactNew(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "新增成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
let id = this.addFrom.id ? this.addFrom.id : null;
|
|
|
|
|
if(id) {
|
|
|
|
|
jSmartRemindersChange(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
jSmartRemindersNew(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "新增成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
@ -262,7 +331,7 @@ export default {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
jEnterpriseContactDel({ id: row.id }).then((res) => {
|
|
|
|
|
jSmartRemindersDel({ id: row.id }).then((res) => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|