Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
fan 2022-10-13 09:37:41 +08:00
commit 704e598e5f
17 changed files with 323 additions and 126 deletions

View File

@ -6,8 +6,8 @@
</div>
</template>
<script>
import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
// import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
export default {
data() {
@ -19,11 +19,15 @@ export default {
};
},
mounted() {
const project = getSessionStorage('project');
this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
// const project = getSessionStorage('project');
// this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
// this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
// this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
// this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
this.systemTitle = this.$store.state.projectConfig.homeTitle;
this.logoImg = this.$store.state.projectConfig.loginProLogo;
this.navigationLogoWidth = this.$store.state.projectConfig.homeProLogoWidth + 'px';
this.navigationMarginLeft = '60px';
},
methods: {
goToMain() {

View File

@ -114,7 +114,7 @@ router.beforeEach( async (to, from, next) => {
// }
const response = await getFrontProjectConfigByLogin(project);
if (response.data) {
const {browserTitle, loginProLogo, baseApiUrl, baseSite, ossUrl} = response.data.viewSetting;
const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl, homeTitle, homeProLogoWidth} = response.data.viewSetting;
if (!store.state.user.baseUrl && project) {
const urlData = handlerUrl();
store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API);
@ -123,7 +123,12 @@ router.beforeEach( async (to, from, next) => {
subscribe();
}
document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = loginProLogo ? '/oss-rtss/logo/' + loginProLogo : '';
const url = loginProLogo ? store.state.user.ossUrl + '/logo/' + loginProLogo : '';
document.querySelector("link[rel*='icon']").href = url;
store.commit('setCaseShow', caseShow);
store.dispatch('setHomeProLogoWidth', homeProLogoWidth);
store.dispatch('setLoginProLogo', url);
store.dispatch('setHomeTitle', homeTitle);
NProgress.start();
const loginPath = getRouteInfo(to, response.data.markKey);
const token = to.query.token;

View File

@ -579,11 +579,11 @@ export const publicAsyncRoute = [
component: PublishExamRule,
hidden: true
},
{
path: '/device/examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
// {
// path: '/device/examRule/draft/:mode/:ruleId/:lessonId',
// component: PublishExamRuleDraft,
// hidden: true
// },
{ // 试卷详情
path: '/device/exam/:examId',
component: ExamDetail,
@ -899,11 +899,11 @@ export const asyncRouter = [
component: PublishExamRule,
hidden: true
},
{ // 创建试卷
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
// { // 创建试卷
// path: 'examRule/draft/:mode/:ruleId/:lessonId',
// component: PublishExamRuleDraft,
// hidden: true
// },
{ // 购买
path: 'pay/:lessonId',
component: Pay,
@ -993,11 +993,11 @@ export const asyncRouter = [
i18n: 'router.examRuleManage'
}
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
// {
// path: 'examRule/draft/:mode/:ruleId/:lessonId',
// component: PublishExamRuleDraft,
// hidden: true
// },
{ // 发布ibp盘
path: 'ibp',
component: PublishIBP,
@ -1576,20 +1576,20 @@ export const asyncRouter = [
i18n: 'newRouter.regulationSimulation'
}
}
]
},
{ // 新路由-教学管理菜单
path: '/info',
path: '/teaching',
component: Layout,
meta: {
i18n: 'newRouter.teachingManagement',
roles: [admin, user, userTrainingPlatform]
},
children: [
{ // 班级管理
{
path: 'organization',
component: OrganizationManage,
redirect: '/teaching/organization/classManage',
meta: {
i18n: 'newRouter.teachingManagement'
},
@ -1611,12 +1611,129 @@ export const asyncRouter = [
},
{ // 理论题目管理
path: 'theoryManage',
component: Temporary,
component: BankManage,
hidden: true
},
{ // 考试管理
path: 'examManage',
component: Temporary,
component: OrgExamManage,
hidden: true
},
{
path: 'questionCreate',
component: QuestionCreatePage,
hidden: true
},
{
path: 'questionUpdate/:questionId',
component: QuestionUpdatePage,
hidden: true
}
]
},
{ // 理论题目管理-添加
path: 'questionCreate',
component: QuestionCreatePage,
hidden: true
},
{ // 理论题目管理-编辑
path: 'questionUpdate/:questionId',
component: QuestionUpdatePage,
hidden: true
},
{ // 出题规则管理
path: 'questionsRuleManage',
hidden: true,
component: QuestionsRuleManage
},
{ // 用于实训教学管理部分
path: 'design',
component: DesignPlatform,
hidden: true,
meta: {
i18n: 'router.designhomePage'
},
children: [
{
path: 'home',
component: DesignPlatformHome,
hidden: true
},
{ // 运行图设计
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,
hidden: true
},
{ // 剧本
path: 'script/home/:mapId',
component: ScriptmanageHome,
hidden: true
},
{ // 课程列表
path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
{ // 三维课程列表
path: 'lesson/lesson3d',
component: Lesson3d,
hidden: true
},
{ // 操作定义
path: 'lesson/trainingRule',
component: TrainingRuleList,
hidden: true
},
{ // 操作定义步骤
path: 'lesson/trainingRule/detail',
hidden: true,
component: TrainingRuleEdit
},
{ // 任务管理
path: 'lesson/taskManage',
component: Taskmanage,
hidden: true
},
{ // 实训管理
path: 'lesson/trainingManage',
component: Trainingmanage,
hidden: true
},
{ // 创建课程
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{ // 课程详情
path: 'lesson/details',
component: LessonDetail,
hidden: true,
children: [
{
path: 'edit/:type',
component: LessonEdit,
hidden: true
}
]
},
{ // 新版地图预览
path: 'mapPreviewNew/:mapId',
component: MapPreviewNew,
hidden: true
},
{
path: 'bigScreen/:mapId',
component: BigScreen,
hidden: true
},
{ // ibp列表
path: 'ibp/home/:mapId',
component: IbpHome,
hidden: true
},
{
path: 'ibp/edit',
component: IbpDraw,
hidden: true
}
]
@ -1624,7 +1741,7 @@ export const asyncRouter = [
]
},
{ // 新路由-线路设计
path: '/design',
path: '/lineDesign',
component: Layout,
meta: {
i18n: 'newRouter.lineDesign',
@ -1633,7 +1750,7 @@ export const asyncRouter = [
children: [
{
path: 'usermap',
redirect: '/design/usermap/home',
redirect: '/lineDesign/usermap/home',
component: NewDesignPlatformUser,
meta: {
i18n: 'newRouter.lineDesign'
@ -1690,7 +1807,7 @@ export const asyncRouter = [
]
},
{ // 新路由-系统管理
path: '/system',
path: '/systemManagement',
component: Layout,
meta: {
i18n: 'newRouter.SystemManagement',

View File

@ -19,6 +19,7 @@ import iscs from './modules/iscs';
import rpTools from './modules/rpTools';
import race from './modules/race';
import trainingNew from './modules/trainingNew';
import projectConfig from './modules/projectConfig';
import getters from './getters';
@ -44,7 +45,8 @@ const store = new Vuex.Store({
iscs,
rpTools,
race,
trainingNew
trainingNew,
projectConfig
},
getters
});

View File

@ -94,7 +94,7 @@ const permission = {
},
actions: {
// 生成其他权限路由
GenerateRoutes({ commit }, data) {
GenerateRoutes({ commit, rootState }, data) {
return new Promise(resolve => {
const { roles } = data;
if (roles.includes(superAdmin) && !roles.includes(admin)) { // 只拥有超级管理员 没有管理员权限
@ -110,6 +110,9 @@ const permission = {
if (route.children && route.children.length == 0) {
route.hidden = true;
}
if (route.path == '/case') { // 案例菜单是否显示
route.hidden = !rootState.projectConfig.caseShow;
}
});
commit('SET_ROUTERS', accessedRouters);
resolve();

View File

@ -0,0 +1,39 @@
const user = {
state: {
homeProLogoWidth:0,
loginProLogo:'',
homeTitle:'',
caseShow:true
},
mutations: {
setHomeProLogoWidth: (state, homeProLogoWidth) => {
state.homeProLogoWidth = homeProLogoWidth;
},
setLoginProLogo: (state, loginProLogo) => {
state.loginProLogo = loginProLogo;
},
setHomeTitle: (state, homeTitle) => {
state.homeTitle = homeTitle;
},
setCaseShow: (state, caseShow) => {
state.caseShow = caseShow;
}
},
actions: {
setHomeProLogoWidth({ commit }, homeProLogoWidth) {
commit('setHomeProLogoWidth', homeProLogoWidth);
},
setLoginProLogo({ commit }, loginProLogo) {
commit('setLoginProLogo', loginProLogo);
},
setHomeTitle({ commit }, homeTitle) {
commit('setHomeTitle', homeTitle);
},
setCaseShow({ commit }, caseShow) {
commit('setCaseShow', caseShow);
}
}
};
export default user;

View File

@ -106,13 +106,14 @@ const user = {
Login({ commit }, userInfo) {
const username = userInfo.username.trim();
const password = userInfo.password.trim();
const type = userInfo.type;
// const type = userInfo.type;
const type = 'class';
const project = userInfo.project;
const deviceCode = userInfo.deviceCode;
const teacherLogin = userInfo.teacherLogin;
return new Promise((resolve, reject) => {
// 登录系统
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, LoginParams.LianKeTang);
login(params).then(resp => {
const token = resp.data;
const header = { group: '', 'X-Token': token };

View File

@ -6,7 +6,7 @@
</template>
<script>
import { UrlConfig } from '@/scripts/ConstDic';
// import { UrlConfig } from '@/scripts/ConstDic';
import { listQuestionPage, deleteQuestion } from '@/api/questionBank.js';
import DialogDetail from './dialog-detail';
import { convertSheetToList } from '@/jmapNew/theme/parser/util.js';
@ -134,13 +134,15 @@ export default {
},
methods: {
doCreate() {
this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
// this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
this.$router.push({path: '/teaching/questionCreate'});
},
getCompanyName(companyId) {
return this.companyMap[companyId];
},
edit(index, row) {
this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
// this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
this.$router.push({path: `/teaching/questionUpdate/${row.id}`});
},
doDelete(index, row) {
@ -306,7 +308,8 @@ export default {
this.handleImport(f);
},
questionsRuleManage() {
this.$router.push({ path: `/system/questionsRuleManage`});
// this.$router.push({ path: `/system/questionsRuleManage`});
this.$router.push({ path: `/teaching/questionsRuleManage`});
},
exportTemplate() {
const wb = XLSX.utils.book_new();

View File

@ -0,0 +1,28 @@
<template>
<div class="content_box">
<span>本产品基于长安玖琏</span><span>城市轨道交通实训云平台开发</span>
<br><span>平台网址</span><a target="_blank" href="https://joylink.club/cbtc/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/login</a>
</div>
</template>
<script>
export default {
name: 'BaseDevelopment',
data() {
return {
};
},
mounted() {
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.content_box{
position: absolute;
bottom: 10%;
right: 2%;
line-height: 20px;
font-size: 14px;
}
</style>

View File

@ -13,7 +13,6 @@
<img class="logo" :src="loginProLogo" :style="{ width: loginProLogoWidth+'px'}">
<span>{{ loginOrgTitle }}</span>
</div>
<div class="content-box">
<div class="text-box">{{ loginProtitle }}</div>
<!-- 微信登陆 -->
@ -21,18 +20,24 @@
<!-- 默认登陆 -->
<normal-login ref="normalLogin" :project="backProject" />
</div>
<base-development v-if="baseDevelopment" ref="baseDevelopment" />
<div class="bottomInfo">
<span>{{ aboutSystem }}</span>
</div>
</div>
</div>
</template>
<script>
import { setSessionStorage } from '@/utils/auth';
import bgImg from '@/assets/bg1.jpg';
import LangStorage from '@/utils/lang';
import { getFrontProjectConfigByLogin} from '@/api/projectConfig';
import WechatLogin from './wechatLogin';
import NormalLogin from './normalLogin';
import BaseDevelopment from './baseDevelopment';
export default {
name:'LoginNew',
components: { WechatLogin, NormalLogin },
components: { WechatLogin, NormalLogin, BaseDevelopment },
data() {
return {
backProject:'',
@ -42,9 +47,10 @@ export default {
showBackPic:true,
wechatLogin:true,
loginProLogoWidth:0,
loginProLogoHeight:0,
baseDevelopment:false, //
loginOrgTitle:'',
loginProLogo:''
loginProLogo:'',
aboutSystem:''
};
},
computed: {
@ -69,45 +75,25 @@ export default {
if (response.data) {
this.backProject = response.data.project;
// loginProLogoHeight
const {showBackPic, wechatLogin, browserTitle, loginProtitle, loginProLogoWidth, loginOrgTitle, loginProLogo} = response.data.viewSetting;
const {showBackPic, wechatLogin, aboutSystem, baseDevelopment, browserTitle, homeTitle, caseShow, loginProtitle, loginProLogoWidth, loginOrgTitle, homeProLogoWidth, loginProLogo} = response.data.viewSetting;
this.showBackPic = showBackPic;
this.wechatLogin = wechatLogin;
this.loginProtitle = loginProtitle;
this.loginProLogoWidth = loginProLogoWidth;
// this.loginProLogoHeight = loginProLogoHeight;
// this.homeProLogoWidth = homeProLogoWidth;
this.loginOrgTitle = loginOrgTitle;
this.loginProLogo = loginProLogo ? this.$store.state.user.ossUrl + '/logo/' + loginProLogo : '';
this.aboutSystem = aboutSystem;
this.baseDevelopment = baseDevelopment;
document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = this.loginProLogo;
// document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project]
// aboutSystem:" ICP2021039716"
// baseDevelopment
// :
// false
// caseShow
// :
// true
this.$store.dispatch('setHomeProLogoWidth', homeProLogoWidth);
this.$store.dispatch('setLoginProLogo', this.loginProLogo);
this.$store.dispatch('setHomeTitle', homeTitle);
this.$store.dispatch('setCaseShow', caseShow);
// helpShow
// :
// true
// homeTitle
// :
// ""
// loginContectInformation
// :
// false
// loginOrgTitle
// :
// ""
// loginProLogo
// :
// ""
// loginProLogoHeight
// :
// ""
// loginProLogoWidth
// :
// ""
// loginContectInformation false
setSessionStorage('project', this.project);
}
}).catch(() => {
this.$messageBox('无效的登录路径,请查证路径后重试!');
@ -147,7 +133,7 @@ export default {
.text-box {
font-size: 37px;
font-weight: bold;
top: -60px;
top: -70px;
width: 1200px;
text-align: center;
position: absolute;
@ -165,10 +151,19 @@ export default {
}
.left-logo-box {
position: absolute;
top: 30px;
top: 2%;
font-size: 28px;
font-weight: bold;
left: 30px;
left: 2%;
}
.logo {
vertical-align: middle;
}
.bottomInfo{
position: absolute;
bottom: 10px;
right: 20px;
font-size: 14px;
}
</style>

View File

@ -233,10 +233,10 @@ export default {
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
<style rel="stylesheet/scss" lang="scss" scope>
$bg: #fff;
$dark_gray: #889aa4;
.el-form-item {
.login-form .el-form-item {
background: #fff !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
.el-input {
@ -292,15 +292,15 @@ $dark_gray: #889aa4;
}
}
.popover_box {
position: absolute;
right: 80px;
bottom: 124px;
cursor: pointer;
color: #225592;
font-size: 14px;
position: absolute;
right: 80px;
bottom: 124px;
cursor: pointer;
color: #225592;
font-size: 14px;
}
.active:hover {
color: #409eff;
color: #409eff;
}
.show-pwd {
position: absolute;

View File

@ -83,21 +83,21 @@ export default {
methods:{
clickMenu(val) {
if (val.index === '2-1') {
this.$router.replace('/info/organization/lessonManage');
this.$router.replace('/teaching/organization/lessonManage');
} else if (val.index === '2-2') {
this.$router.replace('/info/organization/draftLessonManage');
this.$router.replace('/teaching/organization/draftLessonManage');
} else if (val.index === '1') {
this.$router.replace('/info/organization/classManage');
this.$router.replace('/teaching/organization/classManage');
} else if (val.index === '3') {
this.$router.replace('/info/organization/examManage');
this.$router.replace('/teaching/organization/examManage');
} else if (val.index === '4') {
this.$router.replace('/info/organization/ruleManage');
this.$router.replace('/teaching/organization/ruleManage');
} else if (val.index === '5') {
this.$router.replace('/info/organization/studentManage');
this.$router.replace('/teaching/organization/studentManage');
} else if (val.index === '6') {
this.$router.replace('/info/organization/trainingManage');
this.$router.push('/teaching/design/home');
} else if (val.index === '7') {
this.$router.replace('/info/organization/theoryManage');
this.$router.replace('/teaching/organization/theoryManage');
}
},
back() {

View File

@ -1,12 +1,12 @@
<template>
<div class="joylink-card">
<div class="exam-box">
<el-steps class="steps" :active="display">
<el-steps class="steps" :active="currentStep">
<el-step :title="$t('publish.testDefinitionMaking')" icon="el-icon-edit" />
<el-step :title="$t('publish.examRuleMaking')" icon="el-icon-setting" />
</el-steps>
<div class="joylink-card forms">
<template v-if="display == 1" class="definition">
<template v-if="currentStep == 1" class="definition">
<exam-from ref="exam" :exam-data="examData" @goNextStep="goNextStep" @createQuickly="createQuickly" />
</template>
<template v-else class="rule">
@ -41,7 +41,7 @@ export default {
},
data() {
return {
display: 1,
currentStep: 1,
examData: {
name: '',
mapId: '',
@ -59,19 +59,19 @@ export default {
},
computed: {
isPrevStep() {
return this.display == 2;
return this.currentStep == 2;
},
isNextStep() {
return this.display == 1;
return this.currentStep == 1;
},
isUpdate() {
return this.$route.params.mode == 'edit';
},
isCreate() {
return this.display == 2 && this.$route.params.mode !== 'edit';
return this.currentStep == 2 && this.$route.params.mode !== 'edit';
},
isFastCreate() {
return this.display == 1 && this.$route.params.mode != 'edit' && Number(this.$route.params.ruleId);
return this.currentStep == 1 && this.$route.params.mode != 'edit' && Number(this.$route.params.ruleId);
}
},
created() {
@ -98,7 +98,7 @@ export default {
},
methods: {
regulation() {
this.display = 1;
this.currentStep = 1;
this.$nextTick(() => {
this.$refs.exam.haveDate = !!this.examData.startDate;
});
@ -143,15 +143,15 @@ export default {
this.$refs.rule.regulation();
},
goNextStep() {
this.display = 2;
this.currentStep = 2;
},
nextStep() {
this.$refs.exam.checkedForm('goNextStep');
},
update() {
if(this.display === 1) {
if(this.currentStep === 1) {
this.$refs.exam.updateForm();
} else if (this.display === 2) {
} else if (this.currentStep === 2) {
this.$refs.rule.updateOk();
}
},

View File

@ -32,9 +32,9 @@
<el-form-item label="登录页Logo宽度:" prop="loginProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item>
<!-- <el-form-item label="登录页Logo高度:" prop="loginProLogoHeight" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoHeight" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item> -->
<el-form-item label="主页Logo宽度:" prop="homeProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.homeProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item>
<el-form-item label="页签名称:" prop="browserTitle" class="inlineBlock">
<el-input v-model="formModel.browserTitle" style="width: 210px;" size="small" />
</el-form-item>
@ -88,7 +88,7 @@ export default {
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:0, // logo
// loginProLogoHeight:0, // logo
homeProLogoWidth:0, // logo
browserTitle:'', //
homeTitle:'', //
@ -145,7 +145,7 @@ export default {
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
// this.formModel.loginProLogoHeight = viewSetting.loginProLogoHeight || 0;
this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
this.formModel.browserTitle = viewSetting.browserTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || '';
@ -171,7 +171,7 @@ export default {
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:'', // logo
// loginProLogoHeight:'', // logo
homeProLogoWidth:'', // logo
browserTitle:'', //
homeTitle:'', //

View File

@ -89,9 +89,12 @@ export default {
// 使
getBackProjectConfigList().then(resp => {
if (resp.data && resp.data.length > 0) {
this.projectMap['DEFAULT'] = {label:'默认', value:'DEFAULT'};
resp.data.forEach(each=>{
this.projectMap[each.value] = each;
if (each.label == '') {
this.projectMap[each.value] = {label:'默认', value:'DEFAULT'};
} else {
this.projectMap[each.value] = each;
}
});
this.queryForm.queryObject.project.config.data = Object.values(this.projectMap);
}

View File

@ -10,9 +10,6 @@
<el-form-item label="项目描述:" prop="description">
<el-input v-model="formModel.description" style="width: 260px;" />
</el-form-item>
<el-form-item label="关联项目:" prop="viewShow">
<el-switch v-model="formModel.viewShow" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -31,8 +28,7 @@ export default {
id: '',
code: '', //
name: '', //
description: '', //
viewShow:false // 01
description: '' //
},
loading: false
};
@ -64,7 +60,6 @@ export default {
this.formModel.code = row.code;
this.formModel.name = row.name;
this.formModel.description = row.description;
this.formModel.viewShow = !!row.viewShow;
} else {
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
@ -76,8 +71,7 @@ export default {
id: '',
code: '', //
name: '', //
description: '', //
viewShow:false // 01
description: '' //
};
this.$refs.ruleForm.resetFields();
this.dialogVisible = false;
@ -88,7 +82,6 @@ export default {
if (valid) {
this.loading = true;
const data = Object.assign({}, this.formModel);
data.viewShow = data.viewShow ? 1 : 0;
// code
checkBackProjectExist({code:data.code}).then(res=>{
if (!res.data) {

View File

@ -51,10 +51,14 @@ export default {
prop: 'description'
},
{
title: '关联项目选择',
prop: 'viewShow',
type: 'tag',
columnValue: (row) => { return row.viewShow ? '是' : '否'; },
title: '默认组织',
prop: 'defaultOrgName'
},
{
title: '关联组织',
prop: 'orgList',
type: 'tagMore',
columnValue: (row) => { return row.orgList; },
tagType: (row) => { return 'success'; }
},
{