clay commit : 第一阶段完成
This commit is contained in:
@@ -3,9 +3,10 @@ ENV = 'development'
|
|||||||
|
|
||||||
# EBTS/开发环境
|
# EBTS/开发环境
|
||||||
#VUE_APP_BASE_API = '/dev-api'
|
#VUE_APP_BASE_API = '/dev-api'
|
||||||
VUE_APP_BASE_API = 'http://192.168.190.67/dev-api'
|
#VUE_APP_BASE_API = 'http://192.168.190.67/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8085/dev-api'
|
#VUE_APP_BASE_API = 'http://127.0.0.1:8085/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
||||||
|
VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ ENV = 'production'
|
|||||||
|
|
||||||
# EBTS/生产环境
|
# EBTS/生产环境
|
||||||
#VUE_APP_BASE_API = '/prod-api'
|
#VUE_APP_BASE_API = '/prod-api'
|
||||||
VUE_APP_BASE_API = 'http://192.168.190.67/dev-api'
|
#VUE_APP_BASE_API = 'http://192.168.190.67/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleUploadSuccess(res) {
|
handleUploadSuccess(res) {
|
||||||
this.$emit("input", res.url);
|
this.$emit("input", res.url);
|
||||||
this.$emit("change",res.fileName,res.url);
|
this.$emit("change",res);
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
},
|
},
|
||||||
handleBeforeUpload() {
|
handleBeforeUpload() {
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* 单点登录url
|
* 单点登录url
|
||||||
*/
|
*/
|
||||||
casloginUrl: 'https://cas.swjtu.edu.cn/authserver/login?service=http://192.168.190.67/dev-api/cas-login',
|
// casloginUrl: 'https://cas.swjtu.edu.cn/authserver/login?service=http://192.168.190.67/dev-api/cas-login',
|
||||||
// casloginUrl: 'https://cas.swjtu.edu.cn/authserver/login?service=http://sist.swjtu.edu.cn/dev-api/cas-login',
|
casloginUrl: 'https://cas.swjtu.edu.cn/authserver/login?service=http://sist.swjtu.edu.cn/dev-api/cas-login',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单点登出url
|
* 单点登出url
|
||||||
*/
|
*/
|
||||||
caslogoutUrl: 'https://cas.swjtu.edu.cn/authserver/logout?service=http://192.168.190.67/admin/logout',
|
// caslogoutUrl: 'https://cas.swjtu.edu.cn/authserver/logout?service=http://192.168.190.67/admin/logout',
|
||||||
// caslogoutUrl: 'https://cas.swjtu.edu.cn/authserver/logout?service=http://sist.swjtu.edu.cn/admin/logout',
|
caslogoutUrl: 'https://cas.swjtu.edu.cn/authserver/logout?service=http://sist.swjtu.edu.cn/admin/logout',
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="文章标题" prop="title">
|
||||||
|
<el-input v-model="queryParams.title" placeholder="请输入文章标题" clearable size="small"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="文章类型" prop="type">
|
<el-form-item label="文章类型" prop="type">
|
||||||
<el-select v-model="queryParams.navId" placeholder="请选择文章类型" clearable size="small">
|
<el-select v-model="queryParams.navId" placeholder="请选择文章类型" clearable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -129,23 +132,6 @@
|
|||||||
<el-table-column label="推送首页" align="center" prop="isEnglish" :formatter="isIndexFormat"/>
|
<el-table-column label="推送首页" align="center" prop="isEnglish" :formatter="isIndexFormat"/>
|
||||||
<el-table-column label="是否英文" align="center" prop="isEnglish" :formatter="isEnglishFormat"/>
|
<el-table-column label="是否英文" align="center" prop="isEnglish" :formatter="isEnglishFormat"/>
|
||||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat"/>
|
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat"/>
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-tag-->
|
|
||||||
<!-- v-if="scope.row.status==1">待取件-->
|
|
||||||
<!-- </el-tag>-->
|
|
||||||
<!-- <el-tag-->
|
|
||||||
<!-- type="warning" v-if="scope.row.status==2"-->
|
|
||||||
<!-- >运输中-->
|
|
||||||
<!-- </el-tag>-->
|
|
||||||
<!-- <el-tag-->
|
|
||||||
<!-- type="danger" v-if="scope.row.status==3"-->
|
|
||||||
<!-- disable-transitions>待收取-->
|
|
||||||
<!-- </el-tag>-->
|
|
||||||
<!-- <el-tag-->
|
|
||||||
<!-- type="success" v-if="scope.row.status==4"-->
|
|
||||||
<!-- disable-transitions>完成-->
|
|
||||||
<!-- </el-tag>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column label="名称" align="center" prop="name"/>
|
<el-table-column label="名称" align="center" prop="name"/>
|
||||||
<el-table-column label="层" align="center" prop="level"/>
|
<el-table-column label="层" align="center" prop="level"/>
|
||||||
|
<el-table-column label="排序" align="center" prop="sort"/>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||||
@@ -81,6 +82,9 @@
|
|||||||
<el-form-item label="层" prop="level">
|
<el-form-item label="层" prop="level">
|
||||||
<el-input-number type="number" :min="1" :max="3" v-model="form.level" placeholder="请输入层"/>
|
<el-input-number type="number" :min="1" :max="3" v-model="form.level" placeholder="请输入层"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number v-model="form.sort" placeholder="排序"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入名称"/>
|
<el-input v-model="form.name" placeholder="请输入名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -187,6 +191,7 @@ export default {
|
|||||||
type: null,
|
type: null,
|
||||||
level: 1,
|
level: 1,
|
||||||
name: null,
|
name: null,
|
||||||
|
sort: 0,
|
||||||
link: null,
|
link: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
|
|||||||
@@ -50,11 +50,14 @@
|
|||||||
<el-table-column label="导航名称" align="left" prop="title"/>
|
<el-table-column label="导航名称" align="left" prop="title"/>
|
||||||
<el-table-column label="英语名称" align="center" prop="englishTitle"/>
|
<el-table-column label="英语名称" align="center" prop="englishTitle"/>
|
||||||
<el-table-column label="导航类型" align="center" prop="type" :formatter="typeFormat"/>
|
<el-table-column label="导航类型" align="center" prop="type" :formatter="typeFormat"/>
|
||||||
|
<el-table-column label="显示类型" align="center" prop="displayType" :formatter="displayTypeFormat"/>
|
||||||
|
<el-table-column label="排序" align="center" prop="sort"/>
|
||||||
<el-table-column label="展示图片" align="center" prop="link">
|
<el-table-column label="展示图片" align="center" prop="link">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<img style="width: 300px;" :src="scope.row.link" alt="">
|
<img style="width: 300px;" :src="scope.row.link" alt="">
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="350" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="350" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-show="scope.row.type == '0'"
|
<el-button v-show="scope.row.type == '0'"
|
||||||
@@ -112,10 +115,15 @@
|
|||||||
<el-form-item label="英语名称" prop="englishTitle">
|
<el-form-item label="英语名称" prop="englishTitle">
|
||||||
<el-input v-model="form.englishTitle" placeholder="英语名称"/>
|
<el-input v-model="form.englishTitle" placeholder="英语名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number v-model="form.sort" placeholder="排序"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="显示网站">
|
<el-form-item label="显示网站">
|
||||||
<el-radio-group v-model="form.displayType">
|
<el-radio-group v-model="form.displayType">
|
||||||
<el-radio-button v-for="dict in displayTypeOptions" :key="dict.dictValue"
|
<el-radio-button v-for="dict in displayTypeOptions" :key="dict.dictValue"
|
||||||
:label="dict.dictValue">{{ dict.dictLabel }}</el-radio-button>
|
:label="dict.dictValue"
|
||||||
|
>{{ dict.dictLabel }}
|
||||||
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="anvTypeEdit" label="导航类型" prop="type">
|
<el-form-item v-show="anvTypeEdit" label="导航类型" prop="type">
|
||||||
@@ -135,19 +143,20 @@
|
|||||||
v-for="dict in thumbnailOptions"
|
v-for="dict in thumbnailOptions"
|
||||||
:key="dict.key"
|
:key="dict.key"
|
||||||
:label="dict.key"
|
:label="dict.key"
|
||||||
>{{dict.label}}</el-radio-button>
|
>{{ dict.label }}
|
||||||
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="内容类型" prop="refId" v-show="articleSelShow">-->
|
<!-- <el-form-item label="内容类型" prop="refId" v-show="articleSelShow">-->
|
||||||
<!-- <el-select v-model="form.refId" placeholder="请选择内容类型" clearable :style="{width: '100%'}">-->
|
<!-- <el-select v-model="form.refId" placeholder="请选择内容类型" clearable :style="{width: '100%'}">-->
|
||||||
<!-- <el-option-->
|
<!-- <el-option-->
|
||||||
<!-- v-for="dict in articleTypeOptions"-->
|
<!-- v-for="dict in articleTypeOptions"-->
|
||||||
<!-- :key="dict.dictCode"-->
|
<!-- :key="dict.dictCode"-->
|
||||||
<!-- :label="dict.dictLabel"-->
|
<!-- :label="dict.dictLabel"-->
|
||||||
<!-- :value="dict.dictCode"-->
|
<!-- :value="dict.dictCode"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="中文层次数据" prop="refId" v-show="empleeSelShow">
|
<el-form-item label="中文层次数据" prop="refId" v-show="empleeSelShow">
|
||||||
<el-select v-model="form.refId" placeholder="请选择层次数据" clearable :style="{width: '100%'}">
|
<el-select v-model="form.refId" placeholder="请选择层次数据" clearable :style="{width: '100%'}">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -169,11 +178,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="imageShow" label="" prop="link">
|
<el-form-item v-show="imageShow" label="" prop="link">
|
||||||
<UploadFile v-model="form.link"
|
<UploadFile v-model="form.link"
|
||||||
file-type="image"
|
file-type="image"
|
||||||
:v-public="true"
|
:v-public="true"
|
||||||
:v-data="false"/>
|
:v-data="false"
|
||||||
<!-- <el-input v-model="form.link" placeholder="请输入导航链接"/>-->
|
/>
|
||||||
|
<!-- <el-input v-model="form.link" placeholder="请输入导航链接"/>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -183,7 +193,8 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="编辑详情" :visible="detailsShow" width="1100px" :close-on-click-modal="false" @close="detailsClose()"
|
<el-dialog title="编辑详情" :visible="detailsShow" width="1100px" :close-on-click-modal="false" @close="detailsClose()"
|
||||||
append-to-body>
|
append-to-body
|
||||||
|
>
|
||||||
<el-form :model="formData" size="medium" label-width="100px">
|
<el-form :model="formData" size="medium" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -221,15 +232,15 @@ import {
|
|||||||
updateDetails,
|
updateDetails,
|
||||||
getDetails,
|
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 Editor from "@/components/Editor"
|
import Editor from '@/components/Editor'
|
||||||
import UploadFile from '@/views/utils/uploadFile'
|
import UploadFile from '@/views/utils/uploadFile'
|
||||||
import { getArticleNav } from '../../../api/sist/article'
|
import { getArticleNav } from '../../../api/sist/article'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Navigation",
|
name: 'Navigation',
|
||||||
components: {
|
components: {
|
||||||
Treeselect,
|
Treeselect,
|
||||||
Editor,
|
Editor,
|
||||||
@@ -238,8 +249,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: {
|
formData: {
|
||||||
title: "",
|
title: '',
|
||||||
content: "",
|
content: ''
|
||||||
},
|
},
|
||||||
detailsShow: false,
|
detailsShow: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -248,18 +259,18 @@ export default {
|
|||||||
showSearch: true,
|
showSearch: true,
|
||||||
articleSelShow: false,
|
articleSelShow: false,
|
||||||
empleeSelShow: false,
|
empleeSelShow: false,
|
||||||
imageShow:false,
|
imageShow: false,
|
||||||
// 导航表格数据
|
// 导航表格数据
|
||||||
navigationTypeOptions: [],
|
navigationTypeOptions: [],
|
||||||
thumbnailOptions: [
|
thumbnailOptions: [
|
||||||
{
|
{
|
||||||
key:0,
|
key: 0,
|
||||||
label:"无",
|
label: '无'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key:1,
|
key: 1,
|
||||||
label:"有",
|
label: '有'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
// 导航树选项
|
// 导航树选项
|
||||||
navigationList: [],
|
navigationList: [],
|
||||||
@@ -269,47 +280,68 @@ export default {
|
|||||||
direTypeOptions: [],
|
direTypeOptions: [],
|
||||||
sistDireTypeOptions: [],
|
sistDireTypeOptions: [],
|
||||||
labDireTypeOptions: [],
|
labDireTypeOptions: [],
|
||||||
displayTypeOptions: [],
|
displayTypeOptions: [
|
||||||
|
{
|
||||||
|
'dictSort': 1,
|
||||||
|
'dictLabel': '同时',
|
||||||
|
'dictValue': '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'dictSort': 2,
|
||||||
|
'dictLabel': '英文',
|
||||||
|
'dictValue': '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'dictSort': 3,
|
||||||
|
'dictLabel': '中文',
|
||||||
|
'dictValue': '3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'dictSort': 4,
|
||||||
|
'dictLabel': '隐藏',
|
||||||
|
'dictValue': '4'
|
||||||
|
}
|
||||||
|
],
|
||||||
navigationType: [],
|
navigationType: [],
|
||||||
navList: [],
|
navList: [],
|
||||||
anvTypeEdit: true,
|
anvTypeEdit: true,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 1: 正常 0:软删除字典
|
// 1: 正常 0:软删除字典
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
title: null,
|
title: null,
|
||||||
englishTitle: null,
|
englishTitle: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
{required: true, message: "导航名称不能为空", trigger: "blur"}
|
{ required: true, message: '导航名称不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
englishTitle: [
|
englishTitle: [
|
||||||
{required: true, message: "英语名称不能为空", trigger: "blur"}
|
{ required: true, message: '英语名称不能为空', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
detailsRules: {
|
detailsRules: {
|
||||||
// title: [
|
// title: [
|
||||||
// {required: true, message: "导航名称不能为空", trigger: "blur"}
|
// {required: true, message: "导航名称不能为空", trigger: "blur"}
|
||||||
// ],
|
// ],
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.getDicts("navigation_type").then(res => {
|
this.getDicts('navigation_type').then(res => {
|
||||||
this.navigationTypeOptions = res.data;
|
this.navigationTypeOptions = res.data
|
||||||
})
|
})
|
||||||
this.getDicts("display_type").then(res => {
|
// this.getDicts('display_type').then(res => {
|
||||||
this.displayTypeOptions = res.data;
|
// this.displayTypeOptions = res.data
|
||||||
})
|
// })
|
||||||
this.getDicts("dire_type").then(res => {
|
this.getDicts('dire_type').then(res => {
|
||||||
let direList = res.data
|
let direList = res.data
|
||||||
for (let dire of direList) {
|
for (let dire of direList) {
|
||||||
if (dire.attribute2 === 1) {
|
if (dire.attribute2 === 1) {
|
||||||
@@ -319,7 +351,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.getDicts("article_type").then(res => {
|
this.getDicts('article_type').then(res => {
|
||||||
let articleList = res.data
|
let articleList = res.data
|
||||||
for (let article of articleList) {
|
for (let article of articleList) {
|
||||||
if (article.attribute2 === 1) {
|
if (article.attribute2 === 1) {
|
||||||
@@ -333,40 +365,43 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询导航列表 */
|
/** 查询导航列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
listNavigation(this.queryParams).then(response => {
|
listNavigation(this.queryParams).then(response => {
|
||||||
this.navList = response.data;
|
this.navList = response.data
|
||||||
this.navigationList = this.handleTree(response.data, "id", "pid");
|
this.navigationList = this.handleTree(response.data, 'id', 'pid')
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 转换导航数据结构 */
|
/** 转换导航数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
if (node.children && !node.children.length) {
|
if (node.children && !node.children.length) {
|
||||||
delete node.children;
|
delete node.children
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
label: node.title,
|
label: node.title,
|
||||||
children: node.children
|
children: node.children
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
typeFormat(row, column) {
|
typeFormat(row, column) {
|
||||||
return this.selectDictLabel(this.navigationTypeOptions, row.type);
|
return this.selectDictLabel(this.navigationTypeOptions, row.type)
|
||||||
|
},
|
||||||
|
displayTypeFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.displayTypeOptions, row.displayType)
|
||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
listNavigation(this.queryParams).then(response => {
|
listNavigation(this.queryParams).then(response => {
|
||||||
this.navigationOptions = [];
|
this.navigationOptions = []
|
||||||
const data = {id: 0, title: '顶级节点', children: []};
|
const data = { id: 0, title: '顶级节点', children: [] }
|
||||||
data.children = this.handleTree(response.data, "id", "pid");
|
data.children = this.handleTree(response.data, 'id', 'pid')
|
||||||
this.navigationOptions.push(data);
|
this.navigationOptions.push(data)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.reset();
|
this.reset()
|
||||||
},
|
},
|
||||||
detailsClose() {
|
detailsClose() {
|
||||||
this.detailsShow = false
|
this.detailsShow = false
|
||||||
@@ -374,47 +409,47 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.articleSelShow = false
|
this.articleSelShow = false
|
||||||
this.imageShow = false;
|
this.imageShow = false
|
||||||
this.empleeSelShow = false
|
this.empleeSelShow = false
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
pid: null,
|
pid: null,
|
||||||
title: null,
|
title: null,
|
||||||
link: null,
|
link: null,
|
||||||
sort: null,
|
sort: 0,
|
||||||
refId: null,
|
refId: null,
|
||||||
enRefId: null,
|
enRefId: null,
|
||||||
displayType: '1',
|
displayType: '1'
|
||||||
};
|
}
|
||||||
this.anvTypeEdit = true
|
this.anvTypeEdit = true
|
||||||
this.resetForm("form");
|
this.resetForm('form')
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm')
|
||||||
this.handleQuery();
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd(row) {
|
handleAdd(row) {
|
||||||
this.reset();
|
this.reset()
|
||||||
// this.getTreeselect();
|
// this.getTreeselect();
|
||||||
this.open = true;
|
this.open = true
|
||||||
this.form.ptitle = row.title
|
this.form.ptitle = row.title
|
||||||
this.form.pid = row.id
|
this.form.pid = row.id
|
||||||
this.form.sitetype = row.sitetype
|
this.form.sitetype = row.sitetype
|
||||||
this.form.type = '0'
|
this.form.type = '0'
|
||||||
this.title = "添加下级导航";
|
this.title = '添加下级导航'
|
||||||
},
|
},
|
||||||
handleUpdateDetails(id) {
|
handleUpdateDetails(id) {
|
||||||
this.detailsShow = true
|
this.detailsShow = true
|
||||||
this.formData = {
|
this.formData = {
|
||||||
id: id,
|
id: id,
|
||||||
title: "",
|
title: '',
|
||||||
content: "",
|
content: ''
|
||||||
}
|
}
|
||||||
getDetails(id).then(res => {
|
getDetails(id).then(res => {
|
||||||
this.formData = res.data
|
this.formData = res.data
|
||||||
@@ -422,7 +457,7 @@ export default {
|
|||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
updateDetails(this.formData).then(res => {
|
updateDetails(this.formData).then(res => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess('修改成功')
|
||||||
this.detailsShow = false
|
this.detailsShow = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -454,86 +489,85 @@ export default {
|
|||||||
this.empleeSelShow = false
|
this.empleeSelShow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form.type==0){
|
if (this.form.type == 0) {
|
||||||
this.imageShow = false;
|
this.imageShow = false
|
||||||
}else {
|
} else {
|
||||||
this.imageShow = true;
|
this.imageShow = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset()
|
||||||
if (row.sisttype == 1) {
|
if (row.sisttype == 1) {
|
||||||
this.articleTypeOptions = this.sistArticleTypeOption
|
this.articleTypeOptions = this.sistArticleTypeOption
|
||||||
} else if (row.sisttype == 2) {
|
} else if (row.sisttype == 2) {
|
||||||
this.articleTypeOptions = this.labArticleTypeOption
|
this.articleTypeOptions = this.labArticleTypeOption
|
||||||
}
|
}
|
||||||
getNavigation(row.id).then(response => {
|
getNavigation(row.id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data
|
||||||
console.log(this.form,"this.form")
|
console.log(this.form, 'this.form')
|
||||||
if (this.form.isThumbnail == null){
|
if (this.form.isThumbnail == null) {
|
||||||
this.form.isThumbnail = 0
|
this.form.isThumbnail = 0
|
||||||
}
|
}
|
||||||
console.log(response.data,"data")
|
console.log(response.data, 'data')
|
||||||
if (this.form.pid == 0) {
|
if (this.form.pid == 0) {
|
||||||
this.form.ptitle = "顶级节点"
|
this.form.ptitle = '顶级节点'
|
||||||
} else {
|
} else {
|
||||||
for (let nav of this.navList) {
|
for (let nav of this.navList) {
|
||||||
if (nav.id == this.form.pid) {
|
if (nav.id == this.form.pid) {
|
||||||
this.form.ptitle = nav.title;
|
this.form.ptitle = nav.title
|
||||||
}
|
}
|
||||||
if (nav.pid == this.form.id) {
|
if (nav.pid == this.form.id) {
|
||||||
this.anvTypeEdit = false;
|
this.anvTypeEdit = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.navigationList,"fgfgfgfg");
|
console.log(this.navigationList, 'fgfgfgfg')
|
||||||
}
|
}
|
||||||
console.log(this.form,"from")
|
console.log(this.form, 'from')
|
||||||
this.navigationTypeChang(response.data.type)
|
if (this.form.type == 0) {
|
||||||
// this.form.refId = parseInt(this.form.refId)
|
this.imageShow = false
|
||||||
this.open = true;
|
} else {
|
||||||
this.title = "修改导航";
|
this.imageShow = true
|
||||||
});
|
}
|
||||||
|
this.open = true
|
||||||
|
this.title = '修改导航'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.imageShow&&this.form.link){
|
|
||||||
this.msgError("图片不能为空,若您已上传请稍等一下!");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateNavigation(this.form).then(response => {
|
updateNavigation(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.open = false
|
||||||
this.open = false;
|
this.msgSuccess('修改成功')
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
addNavigation(this.form).then(response => {
|
addNavigation(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.open = false
|
||||||
this.open = false;
|
this.msgSuccess('新增成功')
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('是否确认删除导航编号为"' + row.id + '"的数据项?', "警告", {
|
this.$confirm('是否确认删除导航编号为"' + row.id + '"的数据项?', '警告', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning"
|
type: 'warning'
|
||||||
}).then(function () {
|
}).then(function() {
|
||||||
return delNavigation(row.id);
|
return delNavigation(row.id)
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess('删除成功')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.save {
|
.save {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="用户昵称" prop="nickName">
|
<el-form-item label="用户昵称" prop="nickName">
|
||||||
<el-input disabled v-model="user.nickName" />
|
<el-input v-model="user.nickName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="phonenumber">
|
<el-form-item label="手机号码" prop="phonenumber">
|
||||||
<el-input v-model="user.phonenumber" maxlength="11" />
|
<el-input v-model="user.phonenumber" maxlength="11" />
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ export default {
|
|||||||
* 改变地址
|
* 改变地址
|
||||||
*/
|
*/
|
||||||
changeAddress(addr) {
|
changeAddress(addr) {
|
||||||
this.form.fileAddr = addr
|
console.log(addr)
|
||||||
|
this.form.fileAddr = addr.fileAddr
|
||||||
|
this.form.fileName = addr.fileName
|
||||||
this.uploadFile();
|
this.uploadFile();
|
||||||
},
|
},
|
||||||
uploadFile() {
|
uploadFile() {
|
||||||
|
|||||||
Reference in New Issue
Block a user