对接系统设置
This commit is contained in:
parent
1d5060b1f4
commit
cb158d2e3d
|
|
@ -405,6 +405,53 @@ export function saveUser(data) {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*查看系统设置-基础设置
|
||||||
|
*/
|
||||||
|
export function basicSetting() {
|
||||||
|
return request({
|
||||||
|
url: `/admin/sysKey/basicSetting`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*查看系统设置-安全设置
|
||||||
|
*/
|
||||||
|
export function securitySetting() {
|
||||||
|
return request({
|
||||||
|
url: `/admin/sysKey/securitySetting`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*查看系统设置-文件上传设置
|
||||||
|
*/
|
||||||
|
export function uploadSetting() {
|
||||||
|
return request({
|
||||||
|
url: `/admin/sysKey/uploadSetting`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*查看系统设置-用户协议-隐私协议
|
||||||
|
*/
|
||||||
|
export function dealSetting(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/sysKey/dealSetting/${params.dealKeyWord}`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*保存系统设置-基础设置础设置-安全设置-文件上传设置
|
||||||
|
*/
|
||||||
|
export function saveSetting(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/sysKey/saveSetting`,
|
||||||
|
method: "POST",
|
||||||
|
data:params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ export enum FileType {
|
||||||
workDynamics = 'workDynamics',//工作管理
|
workDynamics = 'workDynamics',//工作管理
|
||||||
message = 'message',//消息管理富文本
|
message = 'message',//消息管理富文本
|
||||||
messageCover = 'messageCover',//消息管理封面
|
messageCover = 'messageCover',//消息管理封面
|
||||||
|
system = 'system',//系统设置Logo
|
||||||
|
agreement = 'agreement',//协议
|
||||||
}
|
}
|
||||||
// 文件接口类型
|
// 文件接口类型
|
||||||
export enum ApiFile {
|
export enum ApiFile {
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,16 @@
|
||||||
style="width: 240px;"
|
style="width: 240px;"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="用户类型:" prop="usertype">
|
||||||
|
<el-select v-model="addPostFactorForm.usertype">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in usertypeList"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="状态:" prop="delState">
|
<el-form-item label="状态:" prop="delState">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="addPostFactorForm.delState"
|
v-model="addPostFactorForm.delState"
|
||||||
|
|
@ -122,7 +132,7 @@ const ruleForm = reactive<FormRules>({
|
||||||
state: [{ required: true, message: "请选择账号状态", trigger: "change" }],
|
state: [{ required: true, message: "请选择账号状态", trigger: "change" }],
|
||||||
orgcodes: [{ required: true, message: "请选择任职地区", trigger: "change" }],
|
orgcodes: [{ required: true, message: "请选择任职地区", trigger: "change" }],
|
||||||
delState: [{ required: true, message: "请选择状态", trigger: "change" }],
|
delState: [{ required: true, message: "请选择状态", trigger: "change" }],
|
||||||
|
usertype: [{ required: true, message: "请选择用户类型", trigger: "change" }],
|
||||||
});
|
});
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
visible: {
|
visible: {
|
||||||
|
|
@ -150,7 +160,6 @@ const handleSubmit = () => {
|
||||||
addPostFactorForm.value.syspassword = password.value
|
addPostFactorForm.value.syspassword = password.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(addPostFactorForm,'addPostFactorForm==>');
|
|
||||||
let params = {
|
let params = {
|
||||||
...addPostFactorForm.value,
|
...addPostFactorForm.value,
|
||||||
password:addPostFactorForm.value.syspassword
|
password:addPostFactorForm.value.syspassword
|
||||||
|
|
@ -182,6 +191,12 @@ const getRoleList = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//用户类型
|
||||||
|
const usertypeList = ref([
|
||||||
|
{name:'政府用户',value:1},
|
||||||
|
{name:'党员',value:2},
|
||||||
|
{name:'群众',value:3},
|
||||||
|
])
|
||||||
//岗位List
|
//岗位List
|
||||||
const postList = ref([]);
|
const postList = ref([]);
|
||||||
const postProps = {
|
const postProps = {
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,16 @@
|
||||||
label="职务"
|
label="职务"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="usertype"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="用户类型"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.usertype==1?'政府用户':scope.row.usertype==2?'党员':'群众'}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="state"
|
prop="state"
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
|
|
@ -212,6 +222,8 @@ const getList = () => {
|
||||||
unitId: null,
|
unitId: null,
|
||||||
};
|
};
|
||||||
getUserPage(params).then((res: any) => {
|
getUserPage(params).then((res: any) => {
|
||||||
|
console.log(res,'res===>');
|
||||||
|
|
||||||
tableData.value = res.data.list;
|
tableData.value = res.data.list;
|
||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
tableDataloading.value = false;
|
tableDataloading.value = false;
|
||||||
|
|
|
||||||
|
|
@ -8,37 +8,49 @@
|
||||||
class="center-form"
|
class="center-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="文件上传接口" style="width: 94%;">
|
<el-form-item label="文件上传接口" style="width: 94%;">
|
||||||
<el-input placeholder="请输入" type="input" v-model="formData.name" />
|
<el-input placeholder="请输入" type="input" v-model="formData.fileUploadInterface" @blur="save"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="option">
|
|
||||||
<el-button @click="save" type="primary" class="btn">保存</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import axios from "axios";
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import { uploadSetting, saveSetting } from "@/api/Sys";
|
||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
|
//查询文件上传设置
|
||||||
/**
|
const getUploadSetting = () => {
|
||||||
* 保存
|
uploadSetting().then((res: any) => {
|
||||||
*/
|
formData.value = res.data;
|
||||||
const save = () => {
|
|
||||||
axios
|
|
||||||
.put("/json/config.json", {
|
|
||||||
fileurl: 123,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
axios.get("/json/config.json").then((suc) => {
|
|
||||||
alert("成功--------->" + JSON.stringify(suc));
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
alert(error);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 保存
|
||||||
|
const save = (option) => {
|
||||||
|
let params = {
|
||||||
|
keyWord:'file_upload_interface',
|
||||||
|
keyName:'文件上传接口',
|
||||||
|
keyContent:formData.value.fileUploadInterface,
|
||||||
|
}
|
||||||
|
saveSetting(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
// type: "success",
|
||||||
|
});
|
||||||
|
getUploadSetting();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getUploadSetting();
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -7,40 +7,147 @@
|
||||||
:model="formData"
|
:model="formData"
|
||||||
class="center-form"
|
class="center-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="系统名称" style="width: 94%;">
|
<el-form-item label="系统名称" prop="sysName" style="width: 94%;">
|
||||||
<el-input placeholder="请输入" type="input" v-model="formData.name" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="版权信息" style="width: 94%;">
|
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
type="input"
|
type="input"
|
||||||
v-model="formData.address"
|
v-model="formData.sysName"
|
||||||
|
@blur="save(1)"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="版权信息" prop="copyright" style="width: 94%;">
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入"
|
||||||
|
type="input"
|
||||||
|
v-model="formData.copyright"
|
||||||
|
@blur="save(2)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="logo图标" style="width: 94%;">
|
<el-form-item label="logo图标" style="width: 94%;">
|
||||||
<file-upload OTCType="logo" :uuid="uuid" userId="123" />
|
<CustomUpload
|
||||||
|
:listPic="fileList"
|
||||||
|
:OTCType="FileType.system"
|
||||||
|
:uuid="formData.copyrightKeyId"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="1"
|
||||||
|
@onUpdate="updateFile"
|
||||||
|
></CustomUpload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="option">
|
|
||||||
<el-button @click="save" type="primary" class="btn">保存</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import FileUpload from "@/components/CustomUpload/index.vue";
|
// import FileUpload from "@/components/CustomUpload/index.vue";
|
||||||
import { getUUID } from "@/utils/common";
|
import { getYears, getUUID, FileType } from "@/utils/common";
|
||||||
const formData = ref({});
|
import useUserStore from "@/store/modules/user";
|
||||||
const uuid = ref(getUUID());
|
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||||
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import { basicSetting, saveSetting } from "@/api/Sys";
|
||||||
|
|
||||||
|
const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
const uuid = ref(getUUID());
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const fileList = ref([]);
|
||||||
|
const formData = ref({
|
||||||
|
sysName: "",
|
||||||
|
sysNameKeyId: "",
|
||||||
|
copyright: "",
|
||||||
|
copyrightKeyId: "",
|
||||||
|
logoPath: "",
|
||||||
|
logoPathKeyId: "",
|
||||||
|
});
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
name: [{ required: true, message: "请输入预案名称", trigger: "blur" }],
|
||||||
|
othtypeid: [{ required: true, message: "请选择预案类型", trigger: "blur" }],
|
||||||
|
areaCode: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
// 上传附件前
|
||||||
|
const upload = ref();
|
||||||
|
const beforeAvatarUpload = () => {
|
||||||
|
upload.value.submit();
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
//图片查询
|
||||||
|
const getFiles = (FileType) => {
|
||||||
|
getFile(formData.value.copyrightKeyId || uuid.value, FileType).then((res: any) => {
|
||||||
|
if (FileType == "system") {
|
||||||
|
//文件
|
||||||
|
fileList.value = res.data;
|
||||||
|
} else {
|
||||||
|
//一图一表
|
||||||
|
// chartFileList.value = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 文件列表更新
|
||||||
*/
|
*/
|
||||||
const save = () => {
|
const updateFile = (files: any) => {
|
||||||
console.log(formData.value,'formData==>');
|
fileList.value = files;
|
||||||
|
if (fileList.value.length != 0) {
|
||||||
|
save(3);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
//查询基础设置
|
||||||
|
const getBasicSetting = () => {
|
||||||
|
basicSetting().then((res: any) => {
|
||||||
|
formData.value = res.data;
|
||||||
|
getFiles(FileType.system);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存
|
||||||
|
const save = (option) => {
|
||||||
|
let params = {};
|
||||||
|
switch (option) {
|
||||||
|
case 1:
|
||||||
|
params = {
|
||||||
|
keyWord:'sys_name',
|
||||||
|
keyName:'系统名称',
|
||||||
|
keyContent:formData.value.sysName,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
params = {
|
||||||
|
keyWord:'copyright',
|
||||||
|
keyName:'版权信息',
|
||||||
|
keyContent:formData.value.copyright,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
params = {
|
||||||
|
keyWord:'logo_path',
|
||||||
|
keyName:'logo图标',
|
||||||
|
keyContent:fileList.value[0].filepath,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
saveSetting(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
// type: "success",
|
||||||
|
});
|
||||||
|
getBasicSetting();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getBasicSetting();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="percentage-content">
|
<div class="percentage-content">
|
||||||
<el-radio-group class="rg" v-model="tabIndex">
|
<el-radio-group class="rg" v-model="tabIndex" @change="changeRadio">
|
||||||
<template v-for="item in tabs" :key="item.val">
|
<template v-for="item in tabs" :key="item.val">
|
||||||
<el-radio-button class="rb" :label="item.val">{{
|
<el-radio-button class="rb" :label="item.val">{{
|
||||||
item.name
|
item.name
|
||||||
|
|
@ -11,12 +11,15 @@
|
||||||
<div class="qedit">
|
<div class="qedit">
|
||||||
<QuillEditor
|
<QuillEditor
|
||||||
class="qedit"
|
class="qedit"
|
||||||
:value="form.content"
|
:value="formData.dealContent"
|
||||||
@updateValue="getMsg"
|
@updateValue="getMsg"
|
||||||
|
:id="formData.dealKeyId || uuid"
|
||||||
|
:userId="userId"
|
||||||
|
:FileType="FileType.agreement"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="option">
|
<div class="option">
|
||||||
<el-button type="primary" class="btn">保存</el-button>
|
<el-button type="primary" class="btn" @click="save">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -24,18 +27,78 @@
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessageBox } from "element-plus";
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
|
import { dealSetting, saveSetting } from "@/api/Sys";
|
||||||
const tabIndex = ref(0);
|
import { getYears, getUUID, FileType } from "@/utils/common";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
import { log } from "console";
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const tabIndex = ref("user_deal");
|
||||||
const tabs = ref([
|
const tabs = ref([
|
||||||
{ name: "用户协议", val: 0 },
|
{ name: "用户协议", val: "user_deal" },
|
||||||
{ name: "隐私协议", val: 1 },
|
{ name: "隐私协议", val: "privacy_deal" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const form = ref<any>({ content: "" });
|
const formData = ref<any>({ dealContent: "" });
|
||||||
|
const msgContent = ref("");
|
||||||
const getMsg = (val) => {
|
const getMsg = (val) => {
|
||||||
form.content = val;
|
msgContent.value = val;
|
||||||
};
|
};
|
||||||
|
//查询基础设置
|
||||||
|
const getDealSetting = () => {
|
||||||
|
let params = {
|
||||||
|
dealKeyWord: tabIndex.value,
|
||||||
|
};
|
||||||
|
dealSetting(params).then((res: any) => {
|
||||||
|
console.log(res, "res===>");
|
||||||
|
formData.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存
|
||||||
|
const save = () => {
|
||||||
|
let params = {};
|
||||||
|
switch (tabIndex.value) {
|
||||||
|
case "user_deal":
|
||||||
|
params = {
|
||||||
|
keyWord: "user_deal",
|
||||||
|
keyName: "用户协议",
|
||||||
|
keyContent: msgContent.value,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "privacy_deal":
|
||||||
|
params = {
|
||||||
|
keyWord: "privacy_deal",
|
||||||
|
keyName: "隐私协议",
|
||||||
|
keyContent: msgContent.value,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
console.log(params, "params===>");
|
||||||
|
saveSetting(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
// type: "success",
|
||||||
|
});
|
||||||
|
getDealSetting();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const changeRadio = (e) => {
|
||||||
|
getDealSetting();
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getDealSetting();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -9,35 +9,90 @@
|
||||||
class="center-form"
|
class="center-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="初始密码" style="width: 94%;">
|
<el-form-item label="初始密码" style="width: 94%;">
|
||||||
<el-input placeholder="请输入" type="input" v-model="formData.pwd" />
|
<el-input placeholder="请输入" type="input" v-model="formData.originalPwd" @blur="save(1)"/>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="强制修改密码时间" style="width: 94%;">
|
|
||||||
<el-input
|
|
||||||
placeholder="请输入"
|
|
||||||
type="input"
|
|
||||||
v-model="formData.address"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接口加密类型" style="width: 94%;">
|
<el-form-item label="接口加密类型" style="width: 94%;">
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
type="input"
|
type="input"
|
||||||
v-model="formData.address"
|
v-model="formData.encryptType"
|
||||||
|
@blur="save(2)"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="强制修改密码时间" style="width: 94%;">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.modifyPwdTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择强制修改密码时间"
|
||||||
|
size="default"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
@change="save(3)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="option">
|
|
||||||
<el-button type="primary" class="btn">保存</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import FileUpload from "@/components/CustomUpload/index.vue";
|
|
||||||
import { getUUID } from "@/utils/common";
|
import { getUUID } from "@/utils/common";
|
||||||
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import { securitySetting, saveSetting } from "@/api/Sys";
|
||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
const uuid = ref(getUUID());
|
const uuid = ref(getUUID());
|
||||||
|
//查询基础设置
|
||||||
|
const getSecuritySetting = () => {
|
||||||
|
securitySetting().then((res: any) => {
|
||||||
|
formData.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存
|
||||||
|
const save = (option) => {
|
||||||
|
let params = {};
|
||||||
|
switch (option) {
|
||||||
|
case 1:
|
||||||
|
params = {
|
||||||
|
keyWord:'original_pwd',
|
||||||
|
keyName:'初始密码',
|
||||||
|
keyContent:formData.value.originalPwd,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
params = {
|
||||||
|
keyWord:'encrypt_type',
|
||||||
|
keyName:'接口加密类型',
|
||||||
|
keyContent:formData.value.encryptType,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
params = {
|
||||||
|
keyWord:'modify_pwd_time',
|
||||||
|
keyName:'强制修改密码时间',
|
||||||
|
keyContent:formData.value.modifyPwdTime,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
saveSetting(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
// type: "success",
|
||||||
|
});
|
||||||
|
getSecuritySetting();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getSecuritySetting();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user