中台系统设置部分Bug

This commit is contained in:
Lx 2024-10-17 12:50:55 +08:00
parent a9727156f7
commit e560658211
9 changed files with 121 additions and 43 deletions

View File

@ -120,8 +120,8 @@
</div>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="55%" append-to-body>
<el-form ref="form" :model="deviceInfo" label-width="80px" :rules="rules">
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
<el-form ref="form" :model="deviceInfo" label-width="80px" :rules="rules" style="margin-left: 30px">
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules">
<el-form-item label="banner名称" prop="bannerName">
<el-input v-model="deviceInfo.bannerName" style="width: 300px"></el-input>
@ -219,7 +219,8 @@
<el-form-item label="备注" prop="note">
<el-input v-model="deviceInfo.note" style="width: 300px"></el-input>
</el-form-item>
<el-form-item>
<el-form-item style="margin-left: 30px;">
<el-button style="margin-right: 20px;" @click="handleReset">取消</el-button>
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
</el-form-item>
</el-form>
@ -401,6 +402,9 @@ export default {
this.open = true
this.title = '新增banner图'
},
handleReset() {
this.open = false
},
edit(e) {
this.clean()
this.open = true

View File

@ -93,8 +93,8 @@
</div>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="35%" append-to-body>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="margin-left: 25px;">
<el-form-item label="短信模板ID" prop="messageId">
<el-input v-model="form.messageId" style="width: 300px"></el-input>
@ -135,7 +135,8 @@
<el-form-item label="短信内容" prop="content" >
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
</el-form-item>
<el-form-item>
<el-form-item style="margin-left: 40px; margin-top: 40px">
<el-button style="margin-right: 20px;" @click="handleReset">取消</el-button>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
</el-form-item>
</el-form>
@ -235,25 +236,53 @@ export default {
}
});
},
// submitDeviceInfo() {
// //
// console.log(':', this.form);
// if (this.form.id) {
// updateApi(this.form).then(res=>{
// if(res.code === 200) {
// this.getList()
// this.open = false
// }
// })
// }else {
// saveApi(this.form).then(res=>{
// if(res.code === 200) {
// this.getList()
// this.open = false
// }
// })
// }
// },
submitDeviceInfo() {
//
console.log('提交设备信息数据:', this.form);
console.log('提交短信模板数据:', this.form);
if (this.form.id) {
updateApi(this.form).then(res=>{
if(res.code === 200) {
this.getList()
this.open = false
updateApi(this.form).then(res => {
if (res.code === 200) {
this.getList();
this.open = false;
this.$message.success('短信模板更新成功');
} else {
this.$message.error('短信模板更新失败');
}
})
}else {
saveApi(this.form).then(res=>{
if(res.code === 200) {
this.getList()
this.open = false
} else {
saveApi(this.form).then(res => {
if (res.code === 200) {
this.getList();
this.open = false;
this.$message.success('短信模板提交成功');
} else {
this.$message.error('短信模板提交失败');
}
})
}
},
changeStatus(data){
updateApi(data).then(res=>{
if(res.code === 200) {
@ -329,6 +358,9 @@ export default {
createByName: '', //
}
},
handleReset() {
this.open = false
},
}
};
</script>

View File

@ -191,8 +191,10 @@
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
<el-form-item style="margin-left: 60px">
<el-button @click="handleReset" style="margin-right: 20px;">取消</el-button>
<el-button type="primary" @click="submitForm('deviceForm')">保存</el-button>
</el-form-item>
</el-form>
</el-dialog>
@ -399,6 +401,10 @@ export default {
status:'qy'
}
},
handleReset() {
this.open = false
},
}
};
</script>

View File

@ -108,15 +108,15 @@
</div>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="35%" append-to-body>
<el-form ref="form" :model="form" label-width="80px">
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="27%" append-to-body>
<el-form ref="form" :model="form" label-width="120px" :rules="rules" >
<!-- 通知名称 -->
<el-form-item label="通知名称" :required="true">
<el-form-item label="通知名称" prop="notificationName">
<el-input v-model="form.notificationName" placeholder="请输入通知名称" style="width: 300px;"></el-input>
</el-form-item>
<!-- 通知类型 -->
<el-form-item label="通知类型" :required="true">
<el-form-item label="通知类型" prop="notificationType" >
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 300px;">
<el-option label="到期提醒" value="到期提醒"></el-option>
<el-option label="系统升级" value="系统升级"></el-option>
@ -126,19 +126,19 @@
</el-form-item>
<!-- 通知模板 -->
<el-form-item label="通知模板" :required="true">
<el-form-item label="通知模板" prop="templateContent">
<el-input type="textarea" v-model="form.templateContent" placeholder="请输入通知内容" :maxlength="200"
show-word-limit style="width: 300px;"></el-input>
</el-form-item>
<!-- 接收角色 -->
<el-form-item label="接收角色" :required="true">
<el-form-item label="接收角色" prop="recipientRoles">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" @change="getUserByRoles"
style="width: 300px;">
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
<el-option v-for="item in dutyList1" :key="item.id" :label="item.dutyName" :value="item.dutyId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="接收用户" :required="true">
<el-form-item label="接收用户" prop="recipientUser">
<div
style="border: 1px solid #DCDFE6;width: 300px;height: 100px; border-radius: 4px; flex-wrap: wrap;overflow-y: scroll;">
<div style="display: flex;margin: 10px;">
@ -157,14 +157,14 @@
</el-form-item>
<!-- 模板状态 -->
<el-form-item label="模板状态" :required="true">
<el-form-item label="模板状态" prop="templateStatus">
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
</el-form-item>
</el-form>
<el-button type="primary" @click="userEnter1">确定</el-button>
<div style="margin-left: 160px;">
<el-button style="margin-right: 20px" type="primary" @click="userEnter1">确定</el-button>
<el-button @click="userCe2">取消</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open1" width="50%" append-to-body>
<el-table v-loading="" :data="userList" @selection-change="handleSelectionChange" border>
@ -181,7 +181,7 @@
</el-table-column>
</el-table>
<div style="display: flex; justify-content: center; align-items: center;margin-top: 30px">
<div style="margin-left: 30px">
<el-button type="primary" @click="userEnter">确定</el-button>
<el-button @click="userCe();open1 = false">取消</el-button>
</div>
@ -244,6 +244,26 @@ export default {
linshicunshu: [],
getroleStaff:[],
rules: {
notificationName: [
{required: true, message: '请输入通知名称', trigger: 'blur'},
],
notificationType: [
{required: true, message: '请选择通知类型', trigger: 'blur'},
],
templateContent: [
{required: true, message: '请输入通知模版', trigger: 'blur'},
],
recipientRoles: [
{required: true, message: '请选择接收角色', trigger: 'change'},
],
recipientUser: [
{required: true, message: '请选择接收用户', trigger: 'change'},
],
}
};
},
created() {
@ -353,8 +373,21 @@ export default {
},
this.getList()
},
cleanForm() {
this.form = {
notificationName: '',
notificationType: '',
templateContent: '',
recipientRoles: [],
templateStatus: true,
recipientUser: []
};
this.$nextTick(() => {
this.$refs['form'].resetFields();
});
},
handleAdd(e) {
this.clean()
this.cleanForm()
this.open = true;
this.getDutyList()
@ -389,10 +422,11 @@ export default {
this.clean()
this.open = true;
this.title = "编辑通知"
this.getDutyList()
this.form = e
this.form.recipientUser = JSON.parse(this.form.recipientUser)
this.form.recipientRoles = JSON.parse(this.form.recipientRoles)
this.getDutyList()
console.log('提交设备信息数据:', this.deviceInfo);

View File

@ -26,7 +26,7 @@
and ppc.status = #{entity.status}
</if>
</where>
order by ppc.dept_id,ppc.create_time desc
order by ppc.create_time desc
</select>
<select id="selectInfoById" resultType="com.fuint.api.fuyou.vo.PaymentParameterConfigVo">
SELECT ppc.*,sd.dept_name,sd.dept_type,ta.real_name FROM `payment_parameter_config` ppc

View File

@ -60,6 +60,7 @@ legal_representative_id,legal_representative_contact,app_status,create_time,crea
and app_status = #{sysApp.appStatus}
</if>
</where>
order by create_time desc
</select>
<!--统计总行数-->

View File

@ -54,7 +54,7 @@ id,banner_name,product_image,system_position,sort_order,banner_link,banner_statu
and note = #{sysBanner.note}
</if>
</where>
order by sort_order ASC,create_time desc
order by create_time desc
</select>

View File

@ -47,6 +47,7 @@
and template_status = #{entity.templateStatus}
</if>
</where>
order by create_time desc
</select>
<!--统计总行数-->

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.system.dept.mapper.SysDeptMapper">
<select id="selectDeptList" resultType="com.fuint.system.dept.entity.SysDept">
select *
from sys_dept d
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by d.parent_id, d.order_num
</select>
<select id="selectDeptById" parameterType="Long" resultType="com.fuint.system.dept.entity.SysDept">
select d.*,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
@ -51,16 +51,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from t_account where dept_id = #{deptId} and account_status = 1
</select>
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
select count(1) from sys_dept
where parent_id = #{deptId} and if_delete = 0 limit 1
</select>
<select id="selectChildrenDeptById" resultType="com.fuint.system.dept.entity.SysDept">
select * from sys_dept where find_in_set(#{deptId}, ancestors)
</select>
@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectStatusByParentId" resultType="java.lang.Integer">
select count(*) from sys_dept where status = 'jy' and dept_id= #{parentId} and if_delete = 0
</select>
<select id="checkDeptNameUnique" resultType="com.fuint.system.dept.entity.SysDept">
select *
from sys_dept
@ -135,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.deptId}
</foreach>
</update>
<update id="updateDeptStatusNormal" parameterType="String">
update sys_dept set status = 'jy' where ancestors like concat(#{ancestor},'%')
</update>
@ -194,4 +194,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</update>
</mapper>
</mapper>