diff --git a/ebts-ui/public/test.html b/ebts-ui/public/test.html deleted file mode 100644 index a55333c..0000000 --- a/ebts-ui/public/test.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Document - - - - - - - - - - - - diff --git a/ebts-ui/src/api/sist/navigation.js b/ebts-ui/src/api/sist/navigation.js index f041f99..da4b145 100644 --- a/ebts-ui/src/api/sist/navigation.js +++ b/ebts-ui/src/api/sist/navigation.js @@ -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) { return request({ diff --git a/ebts-ui/src/views/sist/navigation/index.vue b/ebts-ui/src/views/sist/navigation/index.vue index 2f9315d..b7fee4b 100644 --- a/ebts-ui/src/views/sist/navigation/index.vue +++ b/ebts-ui/src/views/sist/navigation/index.vue @@ -64,7 +64,7 @@ size="mini" type="text" icon="el-icon-edit" - @click="handleUpdate(scope.row)" + @click="handleUpdateDetails(scope.row)" >修改详情 取 消 + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + @@ -150,19 +176,27 @@ import { delNavigation, addNavigation, updateNavigation, + updateDetails, + getDetails, exportNavigation } from "@/api/sist/navigation"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; -import {getArticleType} from "@/api/sist/article"; +import Editor from "@/components/Editor" export default { name: "Navigation", components: { - Treeselect + Treeselect, + Editor }, data() { return { + formData:{ + title:null, + content:null, + }, + detailsShow:false, // 遮罩层 loading: true, // 显示搜索条件 @@ -201,6 +235,11 @@ export default { englishTitle: [ {required: true, message: "英语名称不能为空", trigger: "blur"} ], + }, + detailsRules:{ + // title: [ + // {required: true, message: "导航名称不能为空", trigger: "blur"} + // ], } }; }, @@ -268,6 +307,9 @@ export default { this.open = false; this.reset(); }, + detailsClose(){ + this.detailsShow = false + }, // 表单重置 reset() { this.articleSelShow = false @@ -302,6 +344,23 @@ export default { this.form.type= '0' 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) { this.articleTypeOptions = [] @@ -389,3 +448,9 @@ export default { } }; + diff --git a/ebts-ui/src/views/system/config/index.vue b/ebts-ui/src/views/system/config/index.vue index ee0d81c..b0418a4 100644 --- a/ebts-ui/src/views/system/config/index.vue +++ b/ebts-ui/src/views/system/config/index.vue @@ -50,6 +50,7 @@ + 删除 + - + @@ -120,6 +122,7 @@ @@ -178,16 +189,72 @@ plain>取 消 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +