01
This commit is contained in:
@@ -3,4 +3,4 @@ ENV = 'production'
|
||||
|
||||
# EBTS/生产环境
|
||||
#VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
||||
VUE_APP_BASE_API = 'http://localhost:8096/dev-api'
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
<el-table-column label="导航名称" align="left" prop="title"/>
|
||||
<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="link">
|
||||
<template slot-scope="scope">
|
||||
<img style="width: 300px;" :src="scope.row.link" alt="">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-show="scope.row.type == '0'"
|
||||
@@ -131,9 +136,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="导航链接" prop="link">-->
|
||||
<!-- <el-input v-model="form.link" placeholder="请输入导航链接"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item v-show="inageShow" label="" prop="link">
|
||||
<UploadFile v-model="form.link"
|
||||
file-type="image"
|
||||
:v-public="true"
|
||||
:v-data="false"/>
|
||||
<!-- <el-input v-model="form.link" placeholder="请输入导航链接"/>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -141,11 +150,12 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="编辑详情" :visible="detailsShow" width="1100px" :close-on-click-modal="false" @close="detailsClose()" append-to-body>
|
||||
<el-dialog title="编辑详情" :visible="detailsShow" width="1100px" :close-on-click-modal="false" @close="detailsClose()"
|
||||
append-to-body>
|
||||
<el-form :model="formData" :rules="detailsRules" size="medium" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<!-- <el-form-item label="详情标题" prop="title">-->
|
||||
<!-- <el-form-item label="详情标题" prop="title">-->
|
||||
<el-form-item label="详情标题">
|
||||
<el-input v-model="formData.title" placeholder="请输入详情标题" clearable :style="{width: '100%'}">
|
||||
</el-input>
|
||||
@@ -183,26 +193,29 @@ import {
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import Editor from "@/components/Editor"
|
||||
import UploadFile from '@/views/utils/uploadFile'
|
||||
|
||||
export default {
|
||||
name: "Navigation",
|
||||
components: {
|
||||
Treeselect,
|
||||
Editor
|
||||
Editor,
|
||||
UploadFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
title:null,
|
||||
content:null,
|
||||
formData: {
|
||||
title: null,
|
||||
content: null,
|
||||
},
|
||||
detailsShow:false,
|
||||
detailsShow: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
articleSelShow: false,
|
||||
empleeSelShow: false,
|
||||
inageShow:false,
|
||||
// 导航表格数据
|
||||
navigationTypeOptions: [],
|
||||
// 导航树选项
|
||||
@@ -214,8 +227,8 @@ export default {
|
||||
sistDireTypeOptions: [],
|
||||
labDireTypeOptions: [],
|
||||
navigationType: [],
|
||||
navList:[],
|
||||
anvTypeEdit:true,
|
||||
navList: [],
|
||||
anvTypeEdit: true,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -237,7 +250,7 @@ export default {
|
||||
{required: true, message: "英语名称不能为空", trigger: "blur"}
|
||||
],
|
||||
},
|
||||
detailsRules:{
|
||||
detailsRules: {
|
||||
// title: [
|
||||
// {required: true, message: "导航名称不能为空", trigger: "blur"}
|
||||
// ],
|
||||
@@ -308,12 +321,13 @@ export default {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
detailsClose(){
|
||||
detailsClose() {
|
||||
this.detailsShow = false
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.articleSelShow = false
|
||||
this.inageShow = false;
|
||||
this.empleeSelShow = false
|
||||
this.form = {
|
||||
id: null,
|
||||
@@ -343,22 +357,22 @@ export default {
|
||||
this.form.ptitle = row.title
|
||||
this.form.pid = row.id
|
||||
this.form.sitetype = row.sitetype
|
||||
this.form.type= '0'
|
||||
this.form.type = '0'
|
||||
this.title = "添加下级导航";
|
||||
},
|
||||
handleUpdateDetails(row){
|
||||
handleUpdateDetails(row) {
|
||||
this.detailsShow = true
|
||||
this.formData={
|
||||
id:row.refId,
|
||||
title:"",
|
||||
content:"",
|
||||
this.formData = {
|
||||
id: row.refId,
|
||||
title: "",
|
||||
content: "",
|
||||
}
|
||||
getDetails(row.refId).then(res=>{
|
||||
getDetails(row.refId).then(res => {
|
||||
this.formData = res.data
|
||||
})
|
||||
},
|
||||
save(){
|
||||
updateDetails(this.formData).then(res=>{
|
||||
save() {
|
||||
updateDetails(this.formData).then(res => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.detailsShow = false
|
||||
})
|
||||
@@ -388,6 +402,12 @@ export default {
|
||||
this.articleSelShow = false
|
||||
this.empleeSelShow = false
|
||||
}
|
||||
|
||||
if (this.form.type==0){
|
||||
this.inageShow = false;
|
||||
}else {
|
||||
this.inageShow = true;
|
||||
}
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -399,14 +419,14 @@ export default {
|
||||
}
|
||||
getNavigation(row.id).then(response => {
|
||||
this.form = response.data;
|
||||
if (this.form.pid==0){
|
||||
if (this.form.pid == 0) {
|
||||
this.form.ptitle = "顶级节点"
|
||||
}else {
|
||||
} else {
|
||||
for (let nav of this.navList) {
|
||||
if (nav.id == this.form.pid){
|
||||
if (nav.id == this.form.pid) {
|
||||
this.form.ptitle = nav.title;
|
||||
}
|
||||
if (nav.pid == this.form.id){
|
||||
if (nav.pid == this.form.id) {
|
||||
this.anvTypeEdit = false;
|
||||
}
|
||||
}
|
||||
@@ -455,7 +475,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.save{
|
||||
.save {
|
||||
//text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog title="修改邮件配置" :visible.sync="editShow" width="600px" append-to-body>
|
||||
<el-dialog title="修改邮件配置" :visible.sync="editMailShow" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="formEdit" :rules="rules" label-width="120px">
|
||||
<el-form-item label="参数名称" prop="configName">
|
||||
<el-input v-model="formEdit.configName" disabled placeholder="请输入参数名称" />
|
||||
@@ -235,7 +235,54 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary"
|
||||
plain @click="submitFormEdit">确 定</el-button>
|
||||
<el-button @click="cancelEdit"
|
||||
<el-button @click="cancelMailEdit"
|
||||
plain>取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog title="修改邮件配置" :visible.sync="editStatisticShow" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="formEdit" :rules="rules" label-width="120px">
|
||||
<el-form-item label="参数名称" prop="configName">
|
||||
<el-input v-model="formEdit.configName" disabled placeholder="请输入参数名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="参数键名" prop="configKey">
|
||||
<el-input v-model="formEdit.configKey" disabled placeholder="请输入参数键名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="职工人数">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.worker" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="在校生人数">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.students" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="研究生导师">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.postgraduateTutor" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科研团队">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.scientificTeam" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高层次人才">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.highLevelTalents" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="重大项目">
|
||||
<el-input-number :min="0" type="number" v-model="statisticConfig.majorProjects" placeholder="请输入参数键值" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="系统内置" prop="configType">-->
|
||||
<!-- <el-radio-group v-model="formEdit.configType">-->
|
||||
<!-- <el-radio-->
|
||||
<!-- v-for="dict in typeOptions"-->
|
||||
<!-- :key="dict.dictValue"-->
|
||||
<!-- :label="dict.dictValue"-->
|
||||
<!-- >{{dict.dictLabel}}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formEdit.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary"
|
||||
plain @click="submitFormEdit">确 定</el-button>
|
||||
<el-button @click="cancelStaEdit"
|
||||
plain>取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -265,7 +312,8 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
editShow:false,
|
||||
editMailShow:false,
|
||||
editStatisticShow:false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 参数表格数据
|
||||
@@ -277,6 +325,7 @@ export default {
|
||||
// 类型数据字典
|
||||
typeOptions: [],
|
||||
mailConfig:{},
|
||||
statisticConfig:{},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
@@ -379,20 +428,34 @@ export default {
|
||||
const configId = row.configId || this.ids
|
||||
getConfig(configId).then(response => {
|
||||
this.formEdit = response.data;
|
||||
this.editShow = true;
|
||||
if (this.formEdit.configKey == 'mail_config'){
|
||||
this.editMailShow = true;
|
||||
this.mailConfig = JSON.parse(this.formEdit.configValue)
|
||||
}else if (this.formEdit.configKey == 'statistic'){
|
||||
this.editStatisticShow = true
|
||||
this.statisticConfig = JSON.parse(this.formEdit.configValue)
|
||||
}
|
||||
});
|
||||
},
|
||||
submitFormEdit(){
|
||||
if (this.formEdit.configKey == 'mail_config'){
|
||||
this.formEdit.configValue = JSON.stringify(this.mailConfig)
|
||||
}else if (this.formEdit.configKey == 'statistic'){
|
||||
this.formEdit.configValue = JSON.stringify(this.statisticConfig)
|
||||
}
|
||||
updateConfig(this.formEdit).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.editShow = false;
|
||||
this.editMailShow = false;
|
||||
this.editStatisticShow = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
cancelEdit(){
|
||||
this.editShow = false;
|
||||
cancelMailEdit(){
|
||||
this.editMailShow = false;
|
||||
},
|
||||
cancelStaEdit(){
|
||||
console.log(JSON.stringify(this.statisticConfig))
|
||||
this.editStatisticShow = false;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
|
||||
Reference in New Issue
Block a user