clay commit : 图片相对路径
This commit is contained in:
@@ -4,4 +4,4 @@ ENV = 'production'
|
||||
# EBTS/生产环境
|
||||
#VUE_APP_BASE_API = '/prod-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 = '/dev-api'
|
||||
|
||||
@@ -16,6 +16,13 @@ export function listDeptExcludeChild(deptId) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询部门列表(排除节点)
|
||||
export function allNav() {
|
||||
return request({
|
||||
url: '/sist/article/all-nav/',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门详细
|
||||
export function getDept(deptId) {
|
||||
|
||||
@@ -8,14 +8,14 @@ module.exports = {
|
||||
/**
|
||||
* 单点登录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://sist.swjtu.edu.cn/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',
|
||||
|
||||
/**
|
||||
* 单点登出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://sist.swjtu.edu.cn/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',
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,11 +13,10 @@
|
||||
:auto-upload="true"
|
||||
>
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { addFile, delFile } from '../../../../api/sist/file'
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
:auto-upload="true"
|
||||
>
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
|
||||
</el-upload>
|
||||
|
||||
</el-col>
|
||||
@@ -187,7 +187,7 @@ export default {
|
||||
id: null,
|
||||
title: null,
|
||||
isTop: '2',
|
||||
isEnglish: '1',
|
||||
isEnglish: '0',
|
||||
content: "",
|
||||
imgurl:null,
|
||||
},
|
||||
@@ -343,7 +343,9 @@ export default {
|
||||
url:dataFile.url,
|
||||
fileName:data.fileName,
|
||||
}
|
||||
let fileStr = '<p><a target="_blank" href="'+mapperItem.url+'">'+mapperItem.fileName+'</a><br/></p>'
|
||||
let url = dataFile.uri
|
||||
url = url.replace("/pubfiles","/attached")
|
||||
let fileStr = '<p><a target="_blank" href="'+url+'">'+mapperItem.fileName+'</a><br/></p>'
|
||||
this.formData.content = this.formData.content + fileStr
|
||||
this.fileMapper.push(mapperItem)
|
||||
})
|
||||
|
||||
@@ -170,13 +170,13 @@
|
||||
>审批
|
||||
</el-button>
|
||||
<span v-show="(scope.row.approvalUserId===userId || isAdmin) && scope.row.status === '3'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handlePutIndex(scope.row)"
|
||||
>推首页
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handlePutIndex(scope.row)"-->
|
||||
<!-- >推首页-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild} from "@/api/system/dept";
|
||||
import {listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild, allNav} from "@/api/system/dept";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "dictLabel",
|
||||
label: "title",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -244,6 +244,7 @@ export default {
|
||||
},
|
||||
|
||||
getSiteTypeTree() {
|
||||
/**
|
||||
this.getDicts('article_type').then(res => {
|
||||
let sist = {
|
||||
attribute2: 1,
|
||||
@@ -268,6 +269,40 @@ export default {
|
||||
this.siteTypeOptions.push(sist)
|
||||
this.siteTypeOptions.push(lab)
|
||||
})
|
||||
*/
|
||||
allNav().then(res => {
|
||||
let sist = {
|
||||
attribute2: 1,
|
||||
dictCode: 0,
|
||||
title: "信息网站",
|
||||
children: [],
|
||||
}
|
||||
let lab = {
|
||||
attribute2: 2,
|
||||
dictCode: 1,
|
||||
title: "lab实验室",
|
||||
children: [],
|
||||
}
|
||||
let data = res.data
|
||||
console.log(data)
|
||||
data.forEach(item=>{
|
||||
let child = {
|
||||
attribute2: item.sitetype,
|
||||
dictCode: item.id,
|
||||
title: item.title,
|
||||
}
|
||||
if (item.sitetype == '1') {
|
||||
sist.children.push(child)
|
||||
} else {
|
||||
lab.children.push(child)
|
||||
}
|
||||
})
|
||||
this.siteTypeOptions.push(sist)
|
||||
this.siteTypeOptions.push(lab)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.siteType.setCheckedKeys(this.form.siteTypes);
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
// 树权限(展开/折叠)
|
||||
@@ -349,20 +384,22 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.getSiteTypeTree();
|
||||
getDept(row.deptId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改部门";
|
||||
console.log(this.form.siteTypes)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.siteType.setCheckedKeys(this.form.siteTypes);
|
||||
});
|
||||
});
|
||||
this.getSiteTypeTree();
|
||||
listDeptExcludeChild(row.deptId).then(response => {
|
||||
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 所有菜单节点数据
|
||||
getSiteTypeAllCheckedKeys() {
|
||||
// 目前被选中的菜单节点
|
||||
|
||||
Reference in New Issue
Block a user