01
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport"
|
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
||||||
<title>Document</title>
|
|
||||||
<!-- css样式-->
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<!-- js块-->
|
|
||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<link>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<script>
|
|
||||||
import Link from "@/layout/components/Sidebar/Link";
|
|
||||||
export default {
|
|
||||||
components: {Link}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -45,6 +45,22 @@ export function updateNavigation(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改导航
|
||||||
|
export function updateDetails(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sist/article/details',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改导航
|
||||||
|
export function getDetails(id) {
|
||||||
|
return request({
|
||||||
|
url: '/sist/article/getdetails/'+id,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除导航
|
// 删除导航
|
||||||
export function delNavigation(id) {
|
export function delNavigation(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdateDetails(scope.row)"
|
||||||
>修改详情
|
>修改详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -140,6 +140,32 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="编辑详情" :visible="detailsShow" width="1100px" :close-on-click-modal="false" @close="detailsClose()" append-to-body>
|
||||||
|
<el-form :model="formData" :rules="detailsRules" size="medium" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<!-- <el-form-item label="详情标题" prop="title">-->
|
||||||
|
<el-form-item label="详情标题">
|
||||||
|
<el-input v-model="formData.title" placeholder="请输入详情标题" clearable :style="{width: '100%'}">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1" :span="22">
|
||||||
|
<Editor v-model="formData.content" :height="500"/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24" class="save">
|
||||||
|
<el-form-item size="large">
|
||||||
|
<el-button type="primary" @click="save">保存</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -150,19 +176,27 @@ import {
|
|||||||
delNavigation,
|
delNavigation,
|
||||||
addNavigation,
|
addNavigation,
|
||||||
updateNavigation,
|
updateNavigation,
|
||||||
|
updateDetails,
|
||||||
|
getDetails,
|
||||||
exportNavigation
|
exportNavigation
|
||||||
} from "@/api/sist/navigation";
|
} from "@/api/sist/navigation";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import {getArticleType} from "@/api/sist/article";
|
import Editor from "@/components/Editor"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Navigation",
|
name: "Navigation",
|
||||||
components: {
|
components: {
|
||||||
Treeselect
|
Treeselect,
|
||||||
|
Editor
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
formData:{
|
||||||
|
title:null,
|
||||||
|
content:null,
|
||||||
|
},
|
||||||
|
detailsShow:false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
@@ -201,6 +235,11 @@ export default {
|
|||||||
englishTitle: [
|
englishTitle: [
|
||||||
{required: true, message: "英语名称不能为空", trigger: "blur"}
|
{required: true, message: "英语名称不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
detailsRules:{
|
||||||
|
// title: [
|
||||||
|
// {required: true, message: "导航名称不能为空", trigger: "blur"}
|
||||||
|
// ],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -268,6 +307,9 @@ export default {
|
|||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
detailsClose(){
|
||||||
|
this.detailsShow = false
|
||||||
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.articleSelShow = false
|
this.articleSelShow = false
|
||||||
@@ -302,6 +344,23 @@ export default {
|
|||||||
this.form.type= '0'
|
this.form.type= '0'
|
||||||
this.title = "添加下级导航";
|
this.title = "添加下级导航";
|
||||||
},
|
},
|
||||||
|
handleUpdateDetails(row){
|
||||||
|
this.detailsShow = true
|
||||||
|
this.formData={
|
||||||
|
id:row.refId,
|
||||||
|
title:"",
|
||||||
|
content:"",
|
||||||
|
}
|
||||||
|
getDetails(row.refId).then(res=>{
|
||||||
|
this.formData = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
save(){
|
||||||
|
updateDetails(this.formData).then(res=>{
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.detailsShow = false
|
||||||
|
})
|
||||||
|
},
|
||||||
//导航类型变化
|
//导航类型变化
|
||||||
navigationTypeChang(type) {
|
navigationTypeChang(type) {
|
||||||
this.articleTypeOptions = []
|
this.articleTypeOptions = []
|
||||||
@@ -389,3 +448,9 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.save{
|
||||||
|
//text-align: center;
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<span v-show="userId === 1">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
v-hasPermi="['system:config:remove']"
|
v-hasPermi="['system:config:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</span>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@@ -110,7 +112,7 @@
|
|||||||
<el-table-column label="参数主键" align="center" prop="configId" />
|
<el-table-column label="参数主键" align="center" prop="configId" />
|
||||||
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
|
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
|
<el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="参数键值" align="center" prop="configValue" />
|
<!-- <el-table-column label="参数键值" align="center" prop="configValue" />-->
|
||||||
<el-table-column label="系统内置" align="center" prop="configType" :formatter="typeFormat" />
|
<el-table-column label="系统内置" align="center" prop="configType" :formatter="typeFormat" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
@@ -120,6 +122,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<span v-show="userId === 1">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -134,6 +137,14 @@
|
|||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:config:remove']"
|
v-hasPermi="['system:config:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
</span>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdateConfig(scope.row)"
|
||||||
|
v-hasPermi="['system:config:edit']"
|
||||||
|
>修改配置</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -178,16 +189,72 @@
|
|||||||
plain>取 消</el-button>
|
plain>取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog title="修改邮件配置" :visible.sync="editShow" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="formEdit" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="参数名称" prop="configName">
|
||||||
|
<el-input v-model="formEdit.configName" disabled placeholder="请输入参数名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数键名" prop="configKey">
|
||||||
|
<el-input v-model="formEdit.configKey" disabled placeholder="请输入参数键名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发件人地址" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.sender" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发件人昵称" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.personal" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户名" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.username" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="密码" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.password" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="加密(默认SSL)" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.encryption" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="服务器地址" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.emailSmtpHost" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="服务端口" prop="configValue">
|
||||||
|
<el-input v-model="mailConfig.emailSmtpPort" placeholder="请输入参数键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="系统内置" prop="configType">-->
|
||||||
|
<!-- <el-radio-group v-model="formEdit.configType">-->
|
||||||
|
<!-- <el-radio-->
|
||||||
|
<!-- v-for="dict in typeOptions"-->
|
||||||
|
<!-- :key="dict.dictValue"-->
|
||||||
|
<!-- :label="dict.dictValue"-->
|
||||||
|
<!-- >{{dict.dictLabel}}</el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="formEdit.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary"
|
||||||
|
plain @click="submitFormEdit">确 定</el-button>
|
||||||
|
<el-button @click="cancelEdit"
|
||||||
|
plain>取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, clearCache } from "@/api/system/config";
|
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, clearCache } from "@/api/system/config";
|
||||||
|
import store from "@/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Config",
|
name: "Config",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
userId:store.getters.userId,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -198,6 +265,7 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
editShow:false,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 参数表格数据
|
// 参数表格数据
|
||||||
@@ -208,6 +276,7 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
// 类型数据字典
|
// 类型数据字典
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
|
mailConfig:{},
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@@ -220,6 +289,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
formEdit: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
configName: [
|
configName: [
|
||||||
@@ -305,6 +375,25 @@ export default {
|
|||||||
this.title = "修改参数";
|
this.title = "修改参数";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleUpdateConfig(row){
|
||||||
|
const configId = row.configId || this.ids
|
||||||
|
getConfig(configId).then(response => {
|
||||||
|
this.formEdit = response.data;
|
||||||
|
this.editShow = true;
|
||||||
|
this.mailConfig = JSON.parse(this.formEdit.configValue)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFormEdit(){
|
||||||
|
this.formEdit.configValue = JSON.stringify(this.mailConfig)
|
||||||
|
updateConfig(this.formEdit).then(response => {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.editShow = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancelEdit(){
|
||||||
|
this.editShow = false;
|
||||||
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|||||||
Reference in New Issue
Block a user