dev_202303
yujialong 2 years ago
parent 2c1c7187b9
commit 7da95181e1
  1. BIN
      src/assets/img/devLogin.jpg
  2. 2
      src/components/Sidebar.vue
  3. 10
      src/router/index.js
  4. 2
      src/setting.js
  5. 1
      src/views/Login.vue
  6. 98
      src/views/course/AddCurriculum.vue
  7. 8
      src/views/course/contentSettings.vue
  8. 2
      src/views/customer/customer.vue
  9. 1
      src/views/data/Framework.vue
  10. 17
      src/views/data/Product.vue
  11. 422
      src/views/devLogin.vue
  12. 1
      src/views/information/list/index.vue
  13. 8
      src/views/order/AddOrder.vue
  14. 35
      src/views/order/Order.vue
  15. 4
      src/views/order/selectClient.vue
  16. 76
      src/views/system/role.vue
  17. 4
      src/views/system/staff.vue
  18. 36
      src/views/theoreticalCourse/contentSettings/index.vue
  19. 6
      src/views/theoreticalCourse/list/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

@ -134,6 +134,8 @@ export default {
methods:{
handleSelect(index){
this.onRoutes = index
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
sessionStorage.setItem('sideBar',index)
},
initMenu() {

@ -214,6 +214,11 @@ let router = new Router({
component: () => import('../views/Login.vue'),
meta: { title: '登录' }
},
{
path: '/devLogin',
component: () => import('../views/devLogin.vue'),
meta: { title: '开发者登录' }
},
{
path: '/join',
component: () => import('../views/join'),
@ -240,8 +245,9 @@ router.beforeEach(function(to, from, next) {
// 根据路由元信息设置文档标题
window.document.title = to.meta.title || '中台';
//使用钩子函数对路由进行权限跳转
if (!sessionStorage.getItem('token') && to.path !== '/login' && to.path !== '/join' && to.path !== '/success') {
next('/login');
const login = location.href.includes('dev.huorantech.cn') ? '/devLogin' : '/login'
if (!sessionStorage.getItem('token') && to.path !== login && to.path !== '/join' && to.path !== '/success') {
next(login);
} else {
next();
}

@ -12,7 +12,7 @@ if (isDev) {
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
// host = 'http://192.168.31.51:9000/'// 榕
host = 'http://192.168.31.116:9000/'// 赓
// host = 'http://192.168.31.116:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'
}

@ -199,6 +199,7 @@ export default {
sessionStorage.setItem('token',res.data.token)
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => {
const list = res.permissionMenu
this.$store.commit('setDataPer', res.dataPermissionList)
this.$message.success(message);
this.$router.push({
path: list[0].children[0].path

@ -96,7 +96,7 @@
</el-select>
</el-form-item>
<el-form-item label="供应厂商" prop="supplier">
<el-select v-model="form.supplier" clearable placeholder="请选择供应厂商">
<el-select v-model="form.supplier" clearable placeholder="请选择供应厂商" multiple>
<el-option v-for="(item, i) in suppliers" :key="i" :label="item.supplierName" :value="item.supplierId"></el-option>
</el-select>
</el-form-item>
@ -203,13 +203,14 @@
<el-switch
v-model="scope.row.isShow"
:active-value="0"
:inactive-value="1">
:inactive-value="1"
:disabled="scope.row.disabled">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button @click.native.prevent="handleDelete(scope.$index, practiceData)">移除
<el-button :disabled="scope.row.disabled" @click.native.prevent="handleDelete(scope.$index, practiceData)">移除
</el-button>
</template>
</el-table-column>
@ -239,7 +240,7 @@
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope">
{{ systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
</template>
</el-table-column>
<el-table-column label="排序" align="center" width="100">
@ -253,13 +254,14 @@
<el-switch
v-model="scope.row.isShow"
:active-value="0"
:inactive-value="1">
:inactive-value="1"
:disabled="scope.row.disabled">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button @click.native.prevent="handleDelete(scope.$index, assessmentData)">移除</el-button>
<el-button :disabled="scope.row.disabled" @click.native.prevent="handleDelete(scope.$index, assessmentData)">移除</el-button>
</template>
</el-table-column>
</el-table>
@ -315,7 +317,7 @@
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope">
{{ systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
</template>
</el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center">
@ -326,7 +328,7 @@
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="55">
<template slot-scope="scope">
<i class="el-icon-delete rm" @click="delProject(scope.$index, scope.row)"></i>
<i :class="['el-icon-delete rm', {disabled: scope.row.disabled}]" @click="delProject(scope.$index, scope.row)"></i>
</template>
</el-table-column>
</el-table>
@ -445,6 +447,7 @@ export default {
updateTime: 0,
systemAll: [],
systems: [],
systemsAll: [],
systemChecked: [],
curSystem: '',
projects: [],
@ -454,7 +457,8 @@ export default {
checkeds: [],
checkedAll: [],
checkAll: false,
suppliers: []
suppliers: [],
mulSystem: this.$store.state.btns.includes('/curriculum:支持多系统组课'), //
};
},
watch: {
@ -488,15 +492,17 @@ export default {
},
mounted() {
console.log(33, this.$store.state.btns.includes('/curriculum:支持多系统组课'))
this.getSubject()
this.getConfig()
this.getSystem()
this.getSupplier()
this.form.cid && this.getInfoData()
},
methods: {
getInfoData() {
this.$post(`${this.api.curriculumDetail}?cid=${this.form.cid}`).then(res => {
let { data } = res;
this.$post(`${this.api.curriculumDetail}?cid=${this.form.cid}`).then(({ data }) => {
if (data.supplier) data.supplier = data.supplier.split(',').map(e => +e)
if (data.categoryId) {
this.$get(this.api.courseProfessionalClass, { disciplineId: data.categoryId }).then(res => {
this.ProfessionalClassList = res.list;
@ -510,18 +516,45 @@ export default {
this.$nextTick(() => {
this.form = data;
data.miniProgramPictureAddress || this.$set(this.form, 'miniProgramPictureAddress', '')
this.practiceData = data.practiceConfig;
this.assessmentData = data.assessmentConfig;
const pList = data.practiceConfig
const { systemsAll } = this
pList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.practiceData = pList
const aList = data.assessmentConfig
aList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.assessmentData = aList
});
}).catch(err => {
});
},
//
getSupplier() {
this.$get(this.api.getSupplierListByRole).then(res => {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
console.log("🚀 ~ file: AddCurriculum.vue ~ line 523 ~ getSupplier ~ sid", sid)
this.$get(this.api.getSupplierListByRole, {
permissionId: sid.permissionId
}).then(res => {
this.suppliers = res.supplierList
}).catch(res => {})
},
//
getSystem() {
const checked = this.permissions ? this.assessmentData : this.practiceData
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$post(this.api.queryServiceConfig, {
systemName: '',
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
}).then(({ serviceList }) => {
this.systemsAll = serviceList.records
}).catch(err => {})
},
getSubject() { //
this.$get(this.api.courseDiscipline).then(res => {
this.subjectList = res.list;
@ -618,10 +651,12 @@ export default {
//
getConfig() {
const checked = this.permissions ? this.assessmentData : this.practiceData
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$post(this.api.queryServiceConfig, {
systemName: this.systemKeyword,
pageNum: 1,
pageSize: 1000
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
}).then(res => {
const list = res.serviceList.records
this.systemAll = JSON.parse(JSON.stringify(list)) //
@ -673,6 +708,11 @@ export default {
this.projectKeyword = ''
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
if (val) {
//
if (!this.mulSystem) {
this.systems.map(e => e.check = false)
item.check = true
}
res.map(e => {
if (!checkeds.find(n => n.projectId == e.projectId && n.systemId == e.systemId)) {
checkeds.push(e)
@ -711,6 +751,7 @@ export default {
})
this.checkAll = !this.projects.find(e => !e.check) //
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) //
console.log("🚀 ~ file: AddCurriculum.vue ~ line 728 ~ projectChange ~ checkedAll", this.checkeds, item)
},
//
filterChecked() {
@ -719,6 +760,7 @@ export default {
},
//
delProject(i, e) {
if (e.disabled) return
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
@ -819,7 +861,7 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
const { form } = this
const form = JSON.parse(JSON.stringify(this.form))
const { businessProportion, manufacturerProportion, settlementMethod, settlementPrice } = form
if (settlementMethod == 0) {
if(!settlementPrice) return this.$message.warning('请输入结算单价')
@ -831,7 +873,9 @@ export default {
if(isNaN(manufacturerProportion)) return this.$message.warning('产品厂商占比请输入数字')
if(+businessProportion + +manufacturerProportion !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改')
}
if (!this.form.coverUrl) {
form.supplier = form.supplier.join()
debugger
if (!form.coverUrl) {
this.$message.warning("请上传课程封面");
return;
}
@ -839,7 +883,7 @@ export default {
this.$message.warning("请添加练习配置");
return;
} else {
this.form.systemIdByPractice = this.practiceData.map(i => {
form.systemIdByPractice = this.practiceData.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
@ -848,13 +892,13 @@ export default {
};
return obj;
});
this.form.systemIdByPractice.sort((a, b) => a.sort - b.sort)
form.systemIdByPractice.sort((a, b) => a.sort - b.sort)
}
if (!this.assessmentData.length) {
this.$message.warning("请添加考核配置");
return;
} else {
this.form.systemIdByAssessment = this.assessmentData.map(i => {
form.systemIdByAssessment = this.assessmentData.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
@ -863,7 +907,7 @@ export default {
};
return obj;
});
this.form.systemIdByAssessment.sort((a, b) => a.sort - b.sort)
form.systemIdByAssessment.sort((a, b) => a.sort - b.sort)
}
this.submiting = true
this.loadIns = this.$loading({
@ -872,8 +916,8 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
if (this.form.cid) {
this.$post(this.api.modifyCourse, this.form).then((res) => {
if (form.cid) {
this.$post(this.api.modifyCourse, form).then((res) => {
this.$message.success("编辑成功");
this.backPage()
}).catch((res) => {
@ -881,7 +925,7 @@ export default {
this.loadIns.close()
});
} else {
this.$post(this.api.createCurriculum, this.form).then((res) => {
this.$post(this.api.createCurriculum, form).then((res) => {
!fromBack ? this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success",
confirmButtonText: "马上设置",
@ -1055,8 +1099,12 @@ $avatar-width: 104px;
.rm {
font-size: 14px;
cursor: pointer;
&.disabled {
color: #ccc;
cursor: not-allowed;
}
&:hover {
color: #9076FF;
color: #17161f;
}
}
}

@ -72,7 +72,7 @@
</el-table>
</div>
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="24%" :close-on-click-modal="false">
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="540px" :close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入章节名称,便于对小节归类" v-model="chapterName" maxlength="50"></el-input>
@ -84,7 +84,7 @@
</span>
</el-dialog>
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="28%" @close="closeSection" :close-on-click-modal="false">
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="540px" @close="closeSection" :close-on-click-modal="false">
<el-form label-width="80px">
<el-form-item label="资源添加">
<el-upload
@ -115,7 +115,7 @@
</span>
</el-dialog>
<el-dialog title="更换文件" :visible.sync="switchVisible" width="28%" :close-on-click-modal="false" @close="closeSwitch">
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false" @close="closeSwitch">
<div style="text-align: center">
<el-upload
:before-upload="beforeUpload"
@ -140,7 +140,7 @@
</span>
</el-dialog>
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="24%" :close-on-click-modal="false">
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>

@ -143,7 +143,7 @@ export default {
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize,
supplierId: sid ? sid.supplierId : ''
supplierId: (sid && !sid.all) ? sid.supplierId : ''
}).then(res => {
this.listData = res.message.list
this.total = res.message.totalCount

@ -569,6 +569,7 @@ export default {
Promise.all(this.tablePromises).then(_ => {
handleDisabled(res)
this.importTypeList = res
this.$refs.typeTree.setCurrentKey()
this.importLoading = false
})
}).catch(res => {

@ -228,7 +228,12 @@ export default {
previewHead: [],
previewData: [],
submited: false,
suppliers: []
suppliers: [
{
supplierName: '或然科技',
supplierId: '1'
}
]
};
},
watch: {
@ -257,7 +262,7 @@ export default {
},
mounted() {
this.getData()
this.getSupplier()
// this.getSupplier()
},
methods: {
//
@ -269,6 +274,7 @@ export default {
pageSize: this.pageSize,
productName: this.keyword,
status: this.status,
supplierId: '1'
}).then(res => {
this.listData = res.pageList.records
this.totals = res.pageList.total
@ -281,7 +287,10 @@ export default {
},
//
getSupplier() {
this.$get(this.api.getSupplierListByRole).then(res => {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '数据管理')
this.$get(this.api.getSupplierListByRole, {
permissionId: sid.permissionId
}).then(res => {
this.suppliers = res.supplierList
}).catch(res => {})
},
@ -556,7 +565,7 @@ export default {
if(!productName) return this.$message.warning('请输入数据产品名称')
if(!market) return this.$message.warning('请输入市场单价格')
if(isNaN(market)) return this.$message.warning('市场单价格请输入数字')
if(!supplier) return this.$message.warning('请输入供应厂商')
if(!supplier) return this.$message.warning('请选择供应厂商')
if (settlementMethod == 0) {
if(!settlementPrice) return this.$message.warning('请输入结算单价')
if(isNaN(settlementPrice)) return this.$message.warning('结算单价请输入数字')

@ -0,0 +1,422 @@
<template>
<div class="wrap">
<div class="header">
<div class="logo">
<img src="../assets/img/logo.png">
</div>
</div>
<div class="login">
<div class="form">
<ul class="tab">
<li v-for="(item, i) in tabList" :key="i" :class="{active: activeIndex == item.id}" @click="handleSelect(item.id)">{{item.label}}</li>
</ul>
<el-form v-show="activeIndex==='1'" :model="param" :rules="rules" ref="login" label-width="0px">
<el-form-item prop="account">
<el-input @blur="blur" v-model="param.account" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
placeholder="请输入密码"
v-model="param.password"
>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="showVerify">
<el-input
placeholder="请输入验证码"
v-model="param.code"
@keyup.enter.native="submitForm()"
>
</el-input>
<img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item>
<div style="width:100%;display:flex;justify-content: flex-end;">
<el-button type="text" class="forget">忘记密码?</el-button>
</div>
<div class="login-btn">
<el-button type="primary" @click="submitForm()">马上登录</el-button>
</div>
</el-form>
<el-form v-show="activeIndex==='2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail" label-width="0px">
<el-form-item prop="account">
<el-input @blur="phoneBlur" v-model="phoneOrEmail.account" placeholder="请输入电话/邮箱"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
placeholder="请输入密码"
v-model="phoneOrEmail.password"
>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="showPhoneVerify">
<el-input
placeholder="请输入验证码"
v-model="phoneOrEmail.code"
@keyup.enter.native="submitForm('phone')"
>
</el-input>
<img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt="">
</el-form-item>
<div style="width:100%;display:flex;justify-content: flex-end;">
<el-button type="text" class="forget">忘记密码?</el-button>
</div>
<div class="login-btn">
<el-button type="primary" @click="submitForm('phone')">马上登录</el-button>
</div>
</el-form>
</div>
</div>
<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>
</el-form-item>
<el-form-item label="验证码">
<div style="display:flex;">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="phoneVisible = false"> </el-button>
<el-button type="primary" @click="phoneSubmit"> </el-button>
</span>
</el-dialog>
<v-footer class="footer" ref="footer"></v-footer>
</div>
</template>
<script>
import vFooter from '../components/Footer'
import Setting from '@/setting'
export default {
data: function() {
var regPhoneOrEmail = (rule, value, callback) => {//
let emailReg = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
if (value === '') {
callback(new Error('请输入手机或邮箱!'));
} else if (!emailReg.test(value)&&!phoneReg.test(value)) {
callback(new Error('输入的手机/邮箱格式不正确!'));
} else {
callback();
}
};
return {
tabList: [
{
id: '1',
label: '账号登录'
}, {
id: '2',
label: '手机号/邮箱登录'
}
],
activeIndex:"1",
showVerify: true,// -
verificationIMG:'',//
//
param: {
account: '',
password: '',
code:'',
platform:3,
random:'',
distinguish:1,
type: 2
},
rules: {
account: [{ required: true, message: '请输入账号', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
},
// +
showPhoneVerify:true,// -
PhoneVerificationIMG:'',//
phoneOrEmail: {
account: '',
password: '',
code:'',
platform:3,
random:'',
distinguish:2,
type: 2
},
phoneOrEmailrules:{
account: [{ validator: regPhoneOrEmail, trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
},
phoneVisible:false,
phone:'',
phoneCode:'',
phoneDisabled:false,
phoneBtnText: '发送验证码',
phoneTimer:'',
phoneOpener:''
};
},
components: {
vFooter
},
watch:{
verificationIMG:function(val){// --
if(val){
this.showVerify = true
}else{
this.showVerify = false
}
},
PhoneVerificationIMG:function(val){// --
if(val){
this.showPhoneVerify = true
}else{
this.showPhoneVerify = false
}
},
},
created(){
if(this.param.account){
this.showVerify = true
}
this.blur()
},
methods: {
submitForm(val) {
let ref = val==='phone'?'phoneOrEmail':'login'
let param = val==='phone'?this.phoneOrEmail:this.param
this.$refs[ref].validate(valid => {
if (valid) {
this.$post(this.api.logins,param).then(res => {
const { message } = res
sessionStorage.setItem('token',res.data.token)
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => {
const list = res.permissionMenu
this.$store.commit('setDataPer', res.dataPermissionList)
this.$message.success(message);
this.$router.push({
path: list[0].children[0].path
});
localStorage.setItem('ms_username', this.param.username);
}).catch(err => {
if (err.status === 500) {
sessionStorage.clear()
}
})
}).catch(err => {
if(err.status===30001){
this.phoneVisible = true
}else if(err.status == 10004){
this.blur()
}
});
} else {
this.$message.error('请输入账号/密码/验证码');
return false;
}
});
},
blur(){
this.param.random = Math.floor(Math.random()*999999999)
this.verificationIMG = this.api.verification+'?random='+`${this.param.random}`
},
phoneBlur(){
this.phoneOrEmail.random = Math.floor(Math.random()*999999999)
this.PhoneVerificationIMG = this.api.verification+'?random='+`${this.phoneOrEmail.random}`
},
handleSelect(val){
this.activeIndex = val
this.param.account = "";
this.param.password = "";
this.param.code = "";
this.phoneOrEmail.account = "";
this.phoneOrEmail.password = "";
this.phoneOrEmail.code = "";
this.$refs.phoneOrEmail.clearValidate()
// this.blur()
this.phoneBlur()
},
sendPhoneCode(){
if(!this.phone) return this.$message.warning('请输入手机号')
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号')
let data = {
phone: this.phone,
types: 2
}
this.$post(this.api.sendPhoneOrEmailCode,data).then(res => {
this.phoneCountdown()//
if(res.message.opener){
this.phoneOpener = res.message.opener
}else{
this.$message(res.message)
}
}).catch(res => {})
},
phoneSubmit(){
if(!this.phone) return this.$message.warning('请输入手机号')
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号')
if(!this.phoneCode) return this.$message.warning('请输入验证码')
let data = {
phone: this.phone,
types: 2,
code: this.phoneCode,
opener: this.phoneOpener,
platform: 3,
account: this.param.account
}
this.$post(this.api.bindPhoneOrEmail,data).then(res => {
sessionStorage.setItem('token',res.token)
this.$router.push({
path:'/customer'
});
localStorage.setItem('ms_username', this.param.username);
this.$message.success('绑定成功')
// this.form.phone = this.phone
// this.phoneVisible = false
}).catch(res => {})
},
phoneCountdown(){
let count = 60
if(!this.phoneTimer){
this.phoneDisabled = true
this.phoneTimer = setInterval(() => {
if(count > 0){
count--
this.phoneBtnText = `${count}秒后重试`
}else{
this.phoneDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.phoneBtnText = `发送验证码`
}
},1000)
}
},
},
};
</script>
<style scoped lang="scss">
.wrap {
min-height: 100%;
}
.login {
position: relative;
height: calc(100vh - 144px);
background-image: url(../assets/img/devLogin.jpg);
background-size: 100%;
}
/deep/ .form {
width: 448px;
position: absolute;
right: 20%;
top: 50%;
padding: 20px 40px 0;
transform: translateY(-50%);
background-color: rgba(255, 255, 255, .85);
border-radius: 4px;
box-sizing: border-box;
.el-input__inner {
height: 50px;
line-height: 50px;
border: 1px solid rgba(220, 220, 220, 1);
border-radius: 2px;
}
.el-form-item {
margin-bottom: 25px;
}
.verification{
position: absolute;
top: 1px;
right: 1px;
width: 160px;
height: 47px;
cursor: pointer;
}
}
.tab{
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 24px;
li{
padding: 18px 5px;
margin: 0 20px;
font-size: 16px;
color: #555;
cursor: pointer;
border-bottom: 2px solid transparent;
&:last-child{
margin-right: 0;
}
&.active{
color: #9076FF;
border-bottom-color: #9076FF;
}
}
}
.title{
font-size: 16px;
text-align: center;
font-weight: bold;
}
.login-btn {
text-align: center;
}
.login-btn button {
width: 100%;
height: 48px;
margin-bottom: 50px;
font-weight: bold;
background: #9076FF;
border-radius: 4px;
}
.forget{
margin-bottom: 28px;
text-align: right;
color: #999;
font-weight:bold;
&:hover{
color: #0092FF;
}
}
/* 头部 */
.header{
height: 60px;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
}
.logo{
width: 171px;
height: 40px;
margin-left: 20px;
}
img{
width: 100%;
height: 100%;
}
.tips {
margin: -20px 0 20px 5px;
font-size: 14px;
text-align: center;
color: #666;
}
</style>

@ -31,6 +31,7 @@ export default {
switchTab(id) {
this.tabsName = id
this.$store.commit('setInfoTab', id)
this.$store.commit('setColumnId', '')
},
//
routeLeave(fn, param) {

@ -988,13 +988,15 @@ export default {
},
//
getClients() {
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '')
this.$post(this.api.queryCustomer, {
countries: this.form.countries,
provinceId: '',
cityId: '',
searchContent: '',
page: 1,
size: 1000
size: 1000,
// supplierId: sid ? sid.supplierId : ''
}).then(res => {
this.clients = res.message.list
}).catch(res => {})
@ -1142,11 +1144,13 @@ export default {
},
//
getCourseJurisdiction() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
let param = {
pageSize: 10,
pageNum: this.coursePage,
isShelves: 1, //
curriculumName: this.curriculumName
curriculumName: this.curriculumName,
supplierId: sid ? sid.supplierId : ''
};
this.dataLoading = true;
this.$post(this.api.curriculumList, param).then(res => {

@ -75,19 +75,7 @@
</el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center">
</el-table-column>
<el-table-column prop="orderContent" label="订单内容" align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top" style='width: 500px' v-if='scope.row.orderContent.length >14'>
<p> {{ scope.row.orderContent }}</p>
<div slot="reference" class="name-wrapper">
<el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag>
</div>
</el-popover>
<span v-else>
{{ scope.row.orderContent }}
</span>
</template>
</el-table-column>
<el-table-column prop="orderContent" label="订单内容" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount" label="订单金额(元)" align="center">
</el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center">
@ -251,13 +239,17 @@ export default {
},
//
getSchool() {
let sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
//
if (!sid) sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理')
this.$post(this.api.queryCustomer, {
countries: '中国',
provinceId: '',
cityId: '',
searchContent: '',
page: 1,
size: 10000
size: 10000,
// supplierId: sid ? sid.supplierId : ''
}).then(res => {
this.schools = res.message.list
}).catch(res => {})
@ -275,13 +267,6 @@ export default {
arr.push(row.orderId);
this.$post(this.api.orderDelete, { ids: arr }).then(res => {
this.$message.success("删除成功");
if(this.orderData.length == 2){
}else{
if(this.pageNo > 1){
this.pageNo = this.pageNo-1
}
}
this.refreshCache(row.customerId)
this.getData();
}).catch(res => {
@ -309,15 +294,11 @@ export default {
}).then(() => {
this.$post(this.api.orderDelete, { ids: list }).then(res => {
const { orderData } = this
list.map(e => this.refreshCache(orderData.find(n => n.orderId == e).customerId))
console.log("🚀 ~ file: Order.vue ~ line 299 ~ this.$post ~ message", list, orderData)
this.$message.success("删除成功");
if(list.length == this.orderData.length){
if(this.pageNo > 1){
this.pageNo = this.pageNo-1
}
}
this.$refs.table.clearSelection()
this.getData();
list.map(e => this.refreshCache(orderData.find(n => n.orderId == e).customerId))
}).catch(err => {
});
}).catch(err => {

@ -161,13 +161,15 @@ export default {
methods: {
//
getData() {
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '')
this.$post(this.api.queryCustomer, {
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize
size: this.pageSize,
// supplierId: sid ? sid.supplierId : ''
}).then(res => {
res.message.list.map(e => {
e.checked = false;

@ -55,7 +55,8 @@
:props="defaultProps">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="datas.includes(node.label)" class="data" @click.stop="showData(data)">数据权限</span>
<span v-if="datas.includes(node.label)" class="data" @click.stop="showData(data, node)">数据权限</span>
<span v-if="data.supplierNames">({{ data.supplierNames }})</span>
</span>
</el-tree>
</div>
@ -71,7 +72,7 @@
<p class="title">请选择要关联的供应商系统</p>
<div class="checks">
<el-checkbox v-model="dataCheckAll" @change="checkAll">全部</el-checkbox>
<el-checkbox v-for="(item, i) in suppliers" :key="i" v-model="item.check">{{ item.supplierName }}</el-checkbox>
<el-checkbox v-for="(item, i) in suppliers" :key="i" v-model="item.check" @change="supChange">{{ item.supplierName }}</el-checkbox>
</div>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="dataVisible = false"> </el-button>
@ -112,7 +113,7 @@ export default {
dataVisible: false,
suppliers: [],
dataCheckAll: false,
curData: {}
curData: {},
};
},
watch: {
@ -125,6 +126,7 @@ export default {
},
mounted() {
this.getData()
this.getSupplier()
},
methods: {
getData() {
@ -133,6 +135,12 @@ export default {
this.total = res.rolePage.total;
}).catch(res => {});
},
//
getSupplier(data) {
this.$get(this.api.getSupplierList).then(res => {
this.suppliers = res.supplierList
}).catch(res => {})
},
currentChange(val) {
this.page = val;
this.getData();
@ -211,6 +219,18 @@ export default {
}
} catch (error) {
}
//
const { datas, suppliers } = this
const ids = suppliers.map(e => e.supplierId)
data[0].children.map(e => {
if (datas.includes(e.name)) {
e.supplierNames = ''
if (!row) {
e.supplierIds = ids
}
}
})
this.permissions = data;
if (row) {
this.getDetail(row);
@ -230,25 +250,37 @@ export default {
checkAll(val) {
this.suppliers.map(e => e.check = val)
},
//
supChange(val) {
this.dataCheckAll = !this.suppliers.find(e => !e.check)
},
//
showData(data) {
showData(data, node) {
this.curData = data
this.dataVisible = true
this.$get(this.api.getSupplierList).then(res => {
const list = res.supplierList
const ids = data.supplierIds
list.map(e => e.check = ids ? ids.includes(e.supplierId) : false)
const list = this.suppliers
let ids = data.supplierIds
list.map(e => this.$set(e, 'check', ids ? ids.includes(e.supplierId) : false))
this.suppliers = list
this.dataCheckAll = !list.find(e => !e.check)
console.log("🚀 ~ file: role.vue ~ line 235 ~ showData ~ data", data)
}).catch(res => {})
},
//
dataSubmit() {
const ids = []
let names = []
this.suppliers.filter(e => e.check).map(e => {
ids.push(e.supplierId)
names.push(e.supplierName)
})
names = this.dataCheckAll ? '全部' : names.join()
if (!ids.length) return this.$message.warning('请至少勾选一个供应商')
const { id } = this.curData
this.permissions[0].children.map(e => {
// id
if (e.id == id) e.supplierIds = this.suppliers.filter(e => e.check).map(e => e.supplierId)
if (e.id == id) {
e.supplierIds = ids
e.supplierNames = names
}
})
this.dataVisible = false
},
@ -269,7 +301,23 @@ export default {
async getDetail(row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.form.id = row.id
const checked = res.permissionList
const per = res.permissionVoList
const ids = this.suppliers.map(e => e.supplierId)
const len = ids.length
// supplierIds
this.permissions[0].children.map(e => {
const sup = per.find(n => n.permissionId == e.id)
//
if (sup) {
e.supplierIds = sup.supplierId.split(',').map(e => +e)
e.supplierNames = sup.supplierName.split(',').length === len ? '全部' : sup.supplierName
} else if (!checked.includes(e.id)) {
e.supplierIds = ids
}
})
console.log(33, this.permissions)
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
@ -323,10 +371,8 @@ export default {
</script>
<style lang="scss" scoped>
.data {
margin-left: 50px;
&:hover {
margin: 0 5px 0 50px;
color: #9076FF;
}
}
.data-dia {
.title {

@ -20,7 +20,7 @@
<el-button type="text" @click="addOrg" v-auth="'/system:后台账号:新增部门'">添加</el-button>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
<div style="overflow: auto">
<el-tree
:data="orgList"
default-expand-all
@ -775,7 +775,7 @@ export default {
}
.wrap {
display: flex;
height: calc(100vh - 223px);
min-height: 100%;
padding: 0 24px;
.side {
width: 300px;

@ -73,7 +73,7 @@
</el-table>
</div>
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="24%" :close-on-click-modal="false">
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="540px" :close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入章节名称,便于对小节归类" v-model="chapterName" maxlength="50"></el-input>
@ -85,7 +85,7 @@
</span>
</el-dialog>
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="28%" @close="closeSection" :close-on-click-modal="false">
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="540px" @close="closeSection" :close-on-click-modal="false">
<el-form label-width="80px">
<el-form-item label="资源添加">
<el-upload
@ -103,7 +103,7 @@
name="file"
>
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
<div slot="tip" class="el-upload__tip">视频请上传MP4格式大小不超过30Moffice文件大小不要超过10M</div>
<div slot="tip" class="el-upload__tip">视频请上传MP4格式</div>
</el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</el-form-item>
@ -117,7 +117,7 @@
</span>
</el-dialog>
<el-dialog title="更换文件" :visible.sync="switchVisible" width="28%" :close-on-click-modal="false" @close="closeSwitch">
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false" @close="closeSwitch">
<div style="text-align: center">
<el-upload
:before-upload="beforeUpload"
@ -143,7 +143,7 @@
</span>
</el-dialog>
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="24%" :close-on-click-modal="false">
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>
@ -366,15 +366,15 @@ export default {
},
//
beforeUpload(file) {
let type = this.transferType(file.name.substring(file.name.lastIndexOf(".") + 1));
if (type != "视频" && type != "图片" && type != "pdf" && (file.size / 1024 / 1024) > 10) {
util.errorMsg("请上传10M以内的文件");
return false;
}
if (type == "视频" && (file.size / 1024 / 1024) > 30) {
util.errorMsg("请上传30M以内的视频");
return false;
}
// let type = this.transferType(file.name.substring(file.name.lastIndexOf(".") + 1));
// if (type != "" && type != "" && type != "pdf" && (file.size / 1024 / 1024) > 10) {
// util.errorMsg("10M");
// return false;
// }
// if (type == "" && (file.size / 1024 / 1024) > 30) {
// util.errorMsg("30M");
// return false;
// }
this.uploading = true;
this.originalFileName = file.name;
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."));
@ -847,7 +847,7 @@ export default {
}
.el-upload__tip {
position: absolute;
top: -4px;
top: 4px;
right: 0;
width: 300px;
line-height: 1.4;
@ -938,4 +938,10 @@ export default {
width: 80%;
background-color: #107c41;
}
.el-button--primary.action-btn {
color: #9076FF !important;
font-size: 14px !important;
background-color: #fff !important;
border-radius: 4px !important;
}
</style>

@ -48,10 +48,12 @@ export default {
},
initTabs() {
const { btns } = this.$store.state
const tab1 = btns.includes('/course/list:课程管理')
const tab2 = btns.includes('/course/list:分类管理')
const tab1 = btns.includes('/theoreticalCourse:平台自建')
const tab2 = btns.includes('/theoreticalCourse:院校创建')
const tab3 = btns.includes('/theoreticalCourse:分类管理')
tab1 || delete this.tabs.first
tab2 || delete this.tabs.second
tab3 || delete this.tabs.third
}
}
};

Loading…
Cancel
Save