clay commit : 图片相对路径

This commit is contained in:
clay
2022-10-25 12:31:01 +08:00
parent 5f5048d5e2
commit 6606d80693
7 changed files with 66 additions and 21 deletions

View File

@@ -4,4 +4,4 @@ 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 = '/dev-api'

View File

@@ -16,6 +16,13 @@ export function listDeptExcludeChild(deptId) {
method: 'get' method: 'get'
}) })
} }
// 查询部门列表(排除节点)
export function allNav() {
return request({
url: '/sist/article/all-nav/',
method: 'get'
})
}
// 查询部门详细 // 查询部门详细
export function getDept(deptId) { export function getDept(deptId) {

View File

@@ -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',
/** /**

View File

@@ -13,11 +13,10 @@
:auto-upload="true" :auto-upload="true"
> >
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <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-upload>
</div> </div>
</template> </template>
<script> <script>
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { addFile, delFile } from '../../../../api/sist/file' import { addFile, delFile } from '../../../../api/sist/file'

View File

@@ -132,7 +132,7 @@
:auto-upload="true" :auto-upload="true"
> >
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <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-upload>
</el-col> </el-col>
@@ -187,7 +187,7 @@ export default {
id: null, id: null,
title: null, title: null,
isTop: '2', isTop: '2',
isEnglish: '1', isEnglish: '0',
content: "", content: "",
imgurl:null, imgurl:null,
}, },
@@ -343,7 +343,9 @@ export default {
url:dataFile.url, url:dataFile.url,
fileName:data.fileName, 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.formData.content = this.formData.content + fileStr
this.fileMapper.push(mapperItem) this.fileMapper.push(mapperItem)
}) })

View File

@@ -170,13 +170,13 @@
>审批 >审批
</el-button> </el-button>
<span v-show="(scope.row.approvalUserId===userId || isAdmin) && scope.row.status === '3'"> <span v-show="(scope.row.approvalUserId===userId || isAdmin) && scope.row.status === '3'">
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
@click="handlePutIndex(scope.row)" <!-- @click="handlePutIndex(scope.row)"-->
>推首页 <!-- >推首页-->
</el-button> <!-- </el-button>-->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"

View File

@@ -161,7 +161,7 @@
</template> </template>
<script> <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 Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -195,7 +195,7 @@ export default {
}, },
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "dictLabel", label: "title",
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -244,6 +244,7 @@ export default {
}, },
getSiteTypeTree() { getSiteTypeTree() {
/**
this.getDicts('article_type').then(res => { this.getDicts('article_type').then(res => {
let sist = { let sist = {
attribute2: 1, attribute2: 1,
@@ -268,6 +269,40 @@ export default {
this.siteTypeOptions.push(sist) this.siteTypeOptions.push(sist)
this.siteTypeOptions.push(lab) 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) { handleUpdate(row) {
this.reset(); this.reset();
this.getSiteTypeTree();
getDept(row.deptId).then(response => { getDept(row.deptId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改部门"; this.title = "修改部门";
console.log(this.form.siteTypes)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.siteType.setCheckedKeys(this.form.siteTypes); this.$refs.siteType.setCheckedKeys(this.form.siteTypes);
}); });
}); });
this.getSiteTypeTree();
listDeptExcludeChild(row.deptId).then(response => { listDeptExcludeChild(row.deptId).then(response => {
this.deptOptions = this.handleTree(response.data, "deptId"); this.deptOptions = this.handleTree(response.data, "deptId");
}); });
}, },
// 所有菜单节点数据 // 所有菜单节点数据
getSiteTypeAllCheckedKeys() { getSiteTypeAllCheckedKeys() {
// 目前被选中的菜单节点 // 目前被选中的菜单节点