模型等修复

dev_2022-03-03
yujialong 3 years ago
parent a2a546099b
commit d1897ccc3f
  1. 4
      src/setting.js
  2. 23
      src/utils/api.js
  3. 9
      src/views/Login.vue
  4. 8
      src/views/course/AddCurriculum.vue
  5. 47
      src/views/serve/addModel.vue
  6. 5
      src/views/serve/backstage/index.vue
  7. 5
      src/views/serve/backstage/model.vue
  8. 41
      src/views/serve/backstage/modelType.vue
  9. 14
      src/views/serve/backstage/sourceType.vue
  10. 12
      src/views/system/staff.vue

@ -13,9 +13,9 @@ if (isDev) {
// jumpPath = "http://39.108.250.202/judgmentPoint/";
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
// host = "http://www.huorantech.cn:9000";//线上
host = "http://39.108.250.202:9000/";//测试
// host = "http://39.108.250.202:9000/";//测试
// host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.137:9000'// 赓
host = 'http://192.168.31.137:9000/'// 赓
} else if (isTest) {
// jumpPath = "http://124.71.12.62/judgmentPoint/";
jumpPath = "http://39.108.250.202/judgmentPoint/";

@ -1,6 +1,7 @@
import Setting from "@/setting";
const uploadURL = Setting.uploadURL
const host = 'http://39.108.250.202:9000/'
export default {
@ -217,17 +218,17 @@ export default {
getKeywordByCategoryId: `data/keyword/getKeywordByCategoryId`,
// 后台账号
deleteArch: `nakadai/staffAccountArchitecture/delete`,
saveArch: `nakadai/staffAccountArchitecture/save`,
treeListArch: `nakadai/staffAccountArchitecture/treeList`,
updateArch: `nakadai/staffAccountArchitecture/update`,
delStaff: `nakadai/backstageStaff/delStaff`,
modifyStaff: `nakadai/backstageStaff/modifyStaff`,
saveStaff: `nakadai/backstageStaff/saveStaff`,
staffDetail: `nakadai/backstageStaff/staffDetail`,
staffList: `nakadai/backstageStaff/staffList`,
importStaff: `nakadai/backstageStaff/importStaff`,
exportFailure: `nakadai/backstageStaff/exportFailure`,
deleteArch: `${host}nakadai/staffAccountArchitecture/delete`,
saveArch: `${host}nakadai/staffAccountArchitecture/save`,
treeListArch: `${host}nakadai/staffAccountArchitecture/treeList`,
updateArch: `${host}nakadai/staffAccountArchitecture/update`,
delStaff: `${host}nakadai/backstageStaff/delStaff`,
modifyStaff: `${host}nakadai/backstageStaff/modifyStaff`,
saveStaff: `${host}nakadai/backstageStaff/saveStaff`,
staffDetail: `${host}nakadai/backstageStaff/staffDetail`,
staffList: `${host}nakadai/backstageStaff/staffList`,
importStaff: `${host}nakadai/backstageStaff/importStaff`,
exportFailure: `${host}nakadai/backstageStaff/exportFailure`,
// 角色管理
batchRemove: `users/role/batchRemove`, //批量删除角色

@ -75,7 +75,8 @@
</div>
</div>
<el-dialog title="绑定手机号" v-if="phoneVisible" :close-on-click-modal="false" width="30%">
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px">
<p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p>
<el-form ref="form" label-width="60px">
<el-form-item label="手机号">
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>
@ -424,4 +425,10 @@ img{
border-bottom: 0;
background-color: transparent;
}
.tips {
margin: -20px 0 20px 5px;
font-size: 14px;
text-align: center;
color: #666;
}
</style>

@ -78,7 +78,7 @@
</el-col>
<el-col :span="14" :offset="5">
<el-form-item label="课程封面">
<el-form-item label="课程封面" prop="coverUrl">
<el-upload
class="avatar-uploader"
accept=".jpg,.png,.jpeg"
@ -301,6 +301,9 @@ export default {
courseType: [
{ required: true, message: "请选择课程类别", trigger: "change" }
],
coverUrl: [
{ required: true, message: "请选择课程封面", trigger: "change" }
],
briefIntroduction: [
{ required: true, message: "请输入课程简介", trigger: "blur" }
],
@ -509,9 +512,6 @@ export default {
if (!this.multipleSelection.length) {
this.$message.warning("请选择系统!");
return;
} else if (this.multipleSelection.length > 1) {
this.$message.warning("最多只能选择一个系统!");
return;
} else {
this.getConfigData();
this.configVisible = false;

@ -2,7 +2,7 @@
<div class="wrap">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="$router.back()">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school" v-text="isDetail ? '查看源模型' : (id ? '编辑源模型' : '新增源模型')"></span>
@ -66,9 +66,19 @@ export default {
value: 'id'
},
codeKey: 1,
submiting: false
submiting: false,
updateTime: 0
};
},
watch: {
// ,
form: {
handler(){
this.updateTime++
},
deep:true
},
},
mounted() {
this.getType()
},
@ -91,6 +101,7 @@ export default {
list.map(e => {
// idid
if (id === e.id) {
parentId.shift() // id
this.categoryIdCus = [...parentId, e.id]
} else {
e.children && this.handleId(e.children, id, [...parentId, e.id])
@ -112,7 +123,7 @@ export default {
})
}
handleLeaf(data)
this.categoryList = data
this.categoryList = data[0].children
if (this.id) {
this.getData()
} else {
@ -121,13 +132,13 @@ export default {
}).catch(res => {})
},
//
submit(postStatus){
submit(postStatus, fromBack){
if (this.submiting) return false
const { modelName, categoryId, modelDemo } = this.form
const categoryIdCus = this.categoryIdCus
const id = this.id
if (!modelName) return this.$message.error('请输入模型名称')
if (!categoryIdCus.length) return this.$message.error('请选择模型分类')
if (categoryIdCus[0] === 1) return this.$message.error('请选择模型分类')
if (postStatus) {
if (!modelDemo) return this.$message.error('请输入模型代码')
}
@ -142,19 +153,41 @@ export default {
data.id = id
this.$post(this.api.updateSysModelDemo, data).then(res => {
this.$message.success('编辑成功')
this.$router.back()
fromBack || this.$router.back()
}).catch(res => {
this.submiting = false
})
} else {
this.$post(this.api.saveSysModelDemo, data).then(res => {
this.$message.success('新增成功')
this.$router.back()
fromBack || this.$router.back()
}).catch(res => {
this.submiting = false
})
}
},
//
backPage() {
this.$router.back()
},
//
back() {
const id = this.id
const updateTime = this.updateTime
//
if ((id && updateTime > 1) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.submit(this.postStatus ? 1 : 0, 1)
this.backPage()
}).catch(() => {
this.backPage()
})
} else {
this.backPage()
}
}
}
};
</script>

@ -9,7 +9,7 @@
</div>
<model v-if="active == 'model'"></model>
<sourceModel v-if="active == 'sourceModel'"></sourceModel>
<sourceModel v-else-if="active == 'sourceModel'"></sourceModel>
</div>
</div>
</template>
@ -42,7 +42,8 @@ export default {
path: 'backstage',
query: {
...this.$route.query,
type: index
type: index,
categoryId: ''
}
})
},

@ -127,6 +127,7 @@ export default {
//
add() {
if (!this.$refs.tree.orgList.length) return this.$message.error('请先添加模型分类')
if (this.isTopLevel) return this.$message.error('请选择子分类进入导入模型')
this.modelVisible = true
this.modelLoading = true
//
@ -163,7 +164,7 @@ export default {
// disabled
if (modelChildren.length) {
e.children = [...e.children, ...modelChildren]
} else {
} else if (records.length) {
e.disabled = true
}
resolve()
@ -188,7 +189,7 @@ export default {
}
Promise.all(promises).then(_ => {
data = handleType(data)
this.modelData = data
this.modelData = (data.length && data[0].children && data[0].children.length) ? data : []
this.modelLoading = false
}).catch(res => {})
}).catch(res => {})

@ -9,6 +9,7 @@
<el-button type="text" @click="addType(0)">添加</el-button>
</div>
<org-tree
v-if="orgList.length"
:data="orgList"
default-expand-all
ref="tree"
@ -39,6 +40,7 @@
</span>
</span>
</org-tree>
<div class="none" v-else>暂无数据请点击添加按钮添加模型分类</div>
</div>
<el-dialog :title="Form.id ? '编辑分类' : '新增分类'" :visible.sync="typeVisible" width="24%" center @close="closeDia" :close-on-click-modal="false">
@ -91,7 +93,8 @@ export default {
const { data } = res
this.orgList = data
data.length && this.$nextTick(() => {
this.$refs.tree.setCurrentKey(data[0].id)
const categoryId = this.$route.query.categoryId
this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.getSingle()
})
}).catch(res => {})
@ -107,7 +110,14 @@ export default {
this.$post(`${this.api.modifyIsShowState}?systemId=${this.systemId}&isShow=${val}`).then(res => {}).catch(res => {})
},
getSingle() {
this.$emit('initData')
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => {})
this.$emit('initData')
},
syncModelData() {
//
@ -128,25 +138,6 @@ export default {
this.syncModelData()
}
},
//
syncModel1() {
this.$confirm('同步后当前的组织架构将会被删除,是否继续?', '提示', {
type: 'warning'
}).then(() => {
//
this.$post(`${this.api.delModelInfoBySystemId}?systemId=${this.systemId}`).then(res => {
//
this.$post(this.api.saveReferenceCategory, {
categoryName: '全部',
systemId: this.systemId,
level: 0,
parentId: 0
}).then(res => {
this.addData(res.referenceCategoryId)
}).catch(res => {})
}).catch(() => {})
}).catch(() => {})
},
//
async addData(id) {
//
@ -277,7 +268,7 @@ export default {
}).then(() => {
this.$post(`${this.api.deleteModelClass}?categoryId=${item.id}`).then(res => {
this.$message.success("删除成功")
this.$emit("getData")
this.$emit('initData')
this.getType()
}).catch(res => {})
}).catch(() => {})
@ -291,4 +282,10 @@ export default {
margin-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.none {
margin-top: 20px;
text-align: center;
color: #909399;
font-size: 12px;
}
</style>

@ -83,13 +83,21 @@ export default {
const { data } = res
this.orgList = data
data.length && this.$nextTick(() => {
this.$refs.tree.setCurrentKey(data[0].id)
const categoryId = this.$route.query.categoryId
this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.getSingle()
})
}).catch(res => {})
},
getSingle() {
this.$emit('initData')
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => {})
this.$emit('initData')
},
//
addType(node, data) {
@ -147,7 +155,7 @@ export default {
}).then(() => {
this.$post(`${this.api.deleteSourceModelCategory}?categoryId=${item.id}`).then(res => {
this.$message.success("删除成功")
this.$emit("getData")
this.$emit('initData')
this.getType()
}).catch(res => {})
}).catch(() => {})

@ -134,12 +134,6 @@
<el-form-item prop="account" label="账号">
<el-input v-model.trim="form.account" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model.trim="form.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
<el-form-item prop="roleList" label="授权角色">
<el-select class="w-100" v-model="form.roleList" multiple>
<template v-for="item in roleList">
@ -161,6 +155,12 @@
:props="casProps"
></el-cascader>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model.trim="form.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="staffVisible = false">取消</el-button>

Loading…
Cancel
Save