|
@@ -326,38 +326,7 @@ export default {
|
|
|
email: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
},
|
|
|
|
|
|
- //获取父级导航池
|
|
|
- parentKey: 0,//获取父级导航
|
|
|
- webDpate: {
|
|
|
- checkStrictly: true,
|
|
|
- lazy: true,
|
|
|
-
|
|
|
- },
|
|
|
- parentData: {
|
|
|
- checkStrictly: true,
|
|
|
- lazy: true,
|
|
|
- async lazyLoad(node, resolve) {
|
|
|
- const { level, data } = node;
|
|
|
- if (data && data.children && data.children.length !== 0) {
|
|
|
- return resolve(node)
|
|
|
- }
|
|
|
- let parentId = level == 0 ? 0 : data.value
|
|
|
- let parames = {
|
|
|
- 'pid': parentId
|
|
|
- }
|
|
|
- self.$store.dispatch('pool/categoryList', parames).then(res => {
|
|
|
- if (res.data) {
|
|
|
- const nodes = res.data.map(item => ({
|
|
|
- value: item.id,
|
|
|
- label: item.name,
|
|
|
- leaf: level >= 3,
|
|
|
- children: []
|
|
|
- }))
|
|
|
- resolve(nodes)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
|
|
|
parentKey_2: 0,//获取父级导航
|
|
|
parentData_2: {
|
|
@@ -378,13 +347,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
let parames = {
|
|
|
- 'type': 4,
|
|
|
- 'website_id': self.form.web_site_id ? self.form.web_site_id : self.websiteid,
|
|
|
- 'pid': parentId
|
|
|
+ 'type': 5,
|
|
|
+ 'website_id': self.form.web_site_id ? self.form.web_site_id : self.getWebSiteId(),
|
|
|
+ 'pid': parentId ? parentId : 0
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- self.$store.dispatch('pool/get_creatNews_nav_son_actions', parames).then(res => {
|
|
|
+ self.$store.dispatch('news/getWebsiteNavList', parames).then(res => {
|
|
|
|
|
|
if (res.data) {
|
|
|
const nodes = res.data.map(item => ({
|
|
@@ -806,26 +774,26 @@ export default {
|
|
|
let that = this;
|
|
|
this.form.web_site_id = this.form.web_site_id[0]
|
|
|
that.parentKey_2 += 1;
|
|
|
- this.$store.dispatch('pool/get_creatNews_nav_son_actions', {
|
|
|
- 'type': 4,
|
|
|
- pid: String(this.creatNews_pid_num), website_id: String(this.form.web_site_id)
|
|
|
- }).then(res => {
|
|
|
- if (res.data.length == 0) {//没有导航池子级
|
|
|
- // alert("没有导航池子级");
|
|
|
- return
|
|
|
- }
|
|
|
- this.creatNews_add_nav_pool_arr = res.data;
|
|
|
- this.creatNews_add_nav_pool_arr.forEach((per_obj) => {
|
|
|
- per_obj.label = per_obj.name,
|
|
|
- per_obj.value = per_obj.id,
|
|
|
- this.creatNews_pid_num = per_obj.category_id
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '网络错误,请重试!'
|
|
|
- });
|
|
|
- })
|
|
|
+ // this.$store.dispatch('pool/get_creatNews_nav_son_actions', {
|
|
|
+ // 'type': 5,
|
|
|
+ // pid: String(this.creatNews_pid_num), website_id: String(this.form.web_site_id)
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.data.length == 0) {//没有导航池子级
|
|
|
+ // // alert("没有导航池子级");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // this.creatNews_add_nav_pool_arr = res.data;
|
|
|
+ // this.creatNews_add_nav_pool_arr.forEach((per_obj) => {
|
|
|
+ // per_obj.label = per_obj.name,
|
|
|
+ // per_obj.value = per_obj.id,
|
|
|
+ // this.creatNews_pid_num = per_obj.category_id
|
|
|
+ // })
|
|
|
+ // }).catch(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '网络错误,请重试!'
|
|
|
+ // });
|
|
|
+ // })
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|