diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 72c1c9b..78ece49 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -478,4 +478,16 @@ li { .mce-content-body:not([dir=rtl]) blockquote { border-left: 0; background-color: #ccc; +} +.search-wrap { + display: flex; +} +.search-wrap .el-select { + width: 140px; +} +.search-wrap .keyword .el-input__inner { + border-left: 0; +} +.search-wrap .el-input__inner { + border-radius: 0; } \ No newline at end of file diff --git a/src/setting.js b/src/setting.js index b1dd2f0..9b97fde 100644 --- a/src/setting.js +++ b/src/setting.js @@ -12,7 +12,7 @@ if (isDev) { host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' host = 'http://192.168.31.151:9000/'// 榕 - host = 'http://192.168.31.116:9000/'// 赓 + // host = 'http://192.168.31.116:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' } diff --git a/src/utils/api.js b/src/utils/api.js index df41262..ff12aad 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -99,6 +99,9 @@ export default { updateModelClass: `nakadai/nakadai/model/reference/updateModelClass`, checkIsShowBySystemId: `nakadai/nakadai/model/reference/checkIsShowBySystemId`, modifyIsShowState: `nakadai/nakadai/model/reference/modifyIsShowState`, + editProvinceCity: `nakadai/nakadai/partner-team/editProvinceCity`, + editPartnerTeamRates: `nakadai/nakadai/partner-team/editPartnerTeamRates`, + teamPartnerList: `nakadai/nakadai/partnerAccount/teamPartnerList`, delModelInfoBySystemId: `nakadai/nakadai/model/reference/demo/delModelInfoBySystemId`, deleteReferenceDemo: `nakadai/nakadai/model/reference/demo/deleteReferenceDemo`, @@ -420,4 +423,10 @@ export default { saveParnerFile: `nakadai/nakadai/partner/article/file/save`, theAttachmentUnderTheQueryColumn: `nakadai/nakadai/partner/article/file/theAttachmentUnderTheQueryColumn`, updateParnerFile: `nakadai/nakadai/partner/article/file/update`, + batchDeletionScheme: `nakadai/nakadai/partner/schemeManagement/batchDeletion`, + enableOrDisableScheme: `nakadai/nakadai/partner/schemeManagement/enableOrDisable`, + findByIdScheme: `nakadai/nakadai/partner/schemeManagement/findById`, + saveScheme: `nakadai/nakadai/partner/schemeManagement/save`, + schemeList: `nakadai/nakadai/partner/schemeManagement/schemeList`, + updateScheme: `nakadai/nakadai/partner/schemeManagement/update`, }; \ No newline at end of file diff --git a/src/views/join/index.vue b/src/views/join/index.vue index 8748363..72fb0de 100644 --- a/src/views/join/index.vue +++ b/src/views/join/index.vue @@ -11,15 +11,22 @@
+ + + + + + + + + + - - -
@@ -39,6 +46,8 @@ import Setting from "@/setting" export default { data() { return { + provinces: [], + cities: [], isMobile: util.isMobile(), userName: this.$route.query.userName, teamName: this.$route.query.teamName, @@ -47,14 +56,18 @@ export default { id: this.$route.query.accountId, partnerClassificationId: this.$route.query.id, isTeam: this.$route.query.isTeam, // 移动端创建的为成员(0),pc创建的为团队(1) - account: '', phone: '', code: '', - userName: '' + userName: '', + provinceId: +this.$route.query.provinceId || '', + cityId: +this.$route.query.cityId || '' }, rules: { - account: [ - { required: true, message: '请输入账号', trigger: 'blur' } + provinceId: [ + { required: true, message: '请选择省份', trigger: "change" } + ], + cityId: [ + { required: true, message: '请选择城市', trigger: "change" } ], userName: [ { required: true, message: '请输入用户名', trigger: "blur" } @@ -75,9 +88,25 @@ export default { }; }, mounted() { - + this.getProvince() + this.form.cityId && this.getCity() }, methods: { + // 获取省份 + getProvince(){ + this.$get(this.api.queryProvince).then(res => { + this.provinces = res.list + }).catch(res => {}) + }, + // 获取城市 + getCity(val){ + this.$get(this.api.queryCity,{ + provinceId: val + }).then(res => { + this.cities = res.list + if (val) this.form.cityId = '' + }).catch(res => {}) + }, // 验证手机号 verifyPhone(phone) { if (!phone) { @@ -146,7 +175,6 @@ export default { this.$refs.form.validate((valid) => { if (valid) { if (this.submiting) return false - if (this.accountReapeat) return util.warningMsg("该账号已存在") if (this.phoneRepeat) return util.warningMsg("该手机号已存在") if (this.emailRepeat) return util.warningMsg("该邮箱已存在") const { form } = this diff --git a/src/views/parner/index.vue b/src/views/parner/index.vue index 9da075d..bcc2397 100644 --- a/src/views/parner/index.vue +++ b/src/views/parner/index.vue @@ -7,6 +7,7 @@ +
@@ -15,6 +16,7 @@ import Setting from "@/setting"; import staff from "./staff"; import pcRole from "./pcRole"; import mobileRole from "./mobileRole"; +import rate from "./rate"; export default { data() { return { @@ -22,14 +24,16 @@ export default { tabs: { staff: "账号管理", pcRole: "pc角色权限", - mobileRole: "小程序角色权限" + mobileRole: "小程序角色权限", + rate: "费率管理", } }; }, components: { staff, pcRole, - mobileRole + mobileRole, + rate }, created() { Setting.dynamicRoute && this.initTabs(); @@ -50,10 +54,12 @@ export default { const tab1 = btns.includes('/parner:账号管理') const tab2 = btns.includes('/parner:pc角色权限') const tab3 = btns.includes('/parner:小程序角色权限') + const tab4 = btns.includes('/parner:费率管理') tab1 || delete this.tabs.staff tab2 || delete this.tabs.pcRole tab3 || delete this.tabs.mobileRole + tab4 || delete this.tabs.rate const type = this.$route.query.type const keys = Object.keys(this.tabs) this.active = keys.includes(type) ? type : keys[0] diff --git a/src/views/parner/rate.vue b/src/views/parner/rate.vue new file mode 100644 index 0000000..e878bc1 --- /dev/null +++ b/src/views/parner/rate.vue @@ -0,0 +1,524 @@ + + + + + \ No newline at end of file diff --git a/src/views/parner/staff.vue b/src/views/parner/staff.vue index 0c210d8..686a404 100644 --- a/src/views/parner/staff.vue +++ b/src/views/parner/staff.vue @@ -104,16 +104,28 @@
- + - + - - - + + + + + + + + + + + @@ -173,45 +219,6 @@ import axios from 'axios' export default { components: { OrgTree }, data() { - const accountPass = (rule, value, callback) => { - if (value === '') { - callback(new Error('请输入账号')) - } else { - const pattern = /^[A-Za-z0-9]*$/ - if(pattern.test(value)){ - this.accountChange() - callback() - }else{ - callback(new Error('请输入正确账号格式')) - } - } - } - const phonePass = (rule, value, callback) => { - if (value) { - const pattern = /^1[3456789]\d{9}$/ - if(pattern.test(value)){ - // this.phoneChange() - callback() - }else{ - callback(new Error('请输入正确手机号格式')) - } - } else { - callback() - } - } - const emailPass = (rule, value, callback) => { - if (value) { - const pattern = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/ - if(pattern.test(value)){ - // this.emailChange() - callback() - }else{ - callback(new Error('请输入正确邮箱格式')) - } - } else { - callback() - } - } return { accountId: this.$store.state.accountId, userName: this.$store.state.userName, @@ -236,28 +243,23 @@ export default { keyWord: '', form: { userName: '', - phone: '', - email: '', - account: '' - }, - orgRules: { - partnerClassificationName: [ - { required: true, message: "请输入部门名称", trigger: "blur" } - ] + provinceId: '', + cityId: '', + roleList: [] }, rules: { - account: [ - { required: true,validator: accountPass, trigger: 'blur' } - ], userName: [ { required: true, message: "请输入姓名", trigger: "blur" } ], - phone: [ - { validator: phonePass, trigger: 'blur' } + provinceId: [ + { required: true, message: '请选择省份', trigger: "change" } + ], + cityId: [ + { required: true, message: '请选择城市', trigger: "change" } + ], + roleList: [ + { required: true, message: '请选择角色', trigger: "change" } ], - email: [ - { validator: emailPass, trigger: 'blur' } - ] }, listData: [], page: 1, @@ -265,6 +267,11 @@ export default { total: 0, multipleSelection: [], + orgRules: { + partnerClassificationName: [ + { required: true, message: "请输入部门名称", trigger: "blur" } + ] + }, parnerVisible: false, casProps: { multiple: true, @@ -283,7 +290,10 @@ export default { chooseVisible: false, members: [], choosePartnerId: '', - curRow: '' + curRow: '', + provinces: [], + cities: [], + editVisible: false }; }, watch: { @@ -294,6 +304,8 @@ export default { }, mounted() { this.getOrg() + this.getProvince() + this.getRole() }, methods: { // 获取组织 @@ -462,7 +474,12 @@ export default { pageNum: this.page, pageSize: this.pageSize }).then(({ pageList }) => { + pageList.records.forEach((e, i) => { + e.id = i + }) this.listData = pageList.records + console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData) + this.total = pageList.total }).catch(err => {}) }, @@ -479,6 +496,21 @@ export default { this.page = 1 this.getList() }, + // 获取省份 + getProvince(){ + this.$get(this.api.queryProvince).then(res => { + this.provinces = res.list + }).catch(res => {}) + }, + // 获取城市 + getCity(val){ + this.$get(this.api.queryCity,{ + provinceId: this.form.provinceId + }).then(res => { + this.cities = res.list + if (val) this.form.cityId = '' + }).catch(res => {}) + }, // 删除 del(row) { this.$confirm("确定要删除吗?", "提示", { @@ -509,6 +541,44 @@ export default { this.curRow = row this.transferVisible = true }, + getRole() { + // platformId 合伙人为4,具体看setting.js;port: pc端为0、小程序端为1 + this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => { + this.roleList = res.rolePage.records; + }).catch(res => {}); + }, + // 编辑 + edit(row) { + if (!row.provinceId) row.provinceId = '' + if (!row.cityId) row.cityId = '' + row.roleList = row.roleId.split(',').map(e => +e) + this.editVisible = true + this.form = JSON.parse(JSON.stringify(row)) + row.cityId && this.getCity() + }, + // 编辑提交 + submitEdit() { + this.$refs.form.validate((valid) => { + if (valid) { + if (this.submiting) return false + this.submiting = true + const form = JSON.parse(JSON.stringify(this.form)) + form.classificationId = form.partnerClassificationId + this.$post(this.api.editProvinceCity, form).then(res => { + this.getList() + util.successMsg("编辑成功!") + this.editVisible = false + setTimeout(() => { + this.submiting = false + }, 2000) + }).catch(res => { + setTimeout(() => { + this.submiting = false + }, 2000) + }) + } + }) + }, // 重置密码 resetPassword(row) { const newPwd = Setting.initialPassword @@ -609,7 +679,7 @@ export default { border-right: 1px solid rgba(0, 0, 0, 0.06); } .right { - flex: 1; + width: calc(100% - 324px); padding: 24px 0; } } diff --git a/src/views/parnerOperation/learnMg.vue b/src/views/parnerOperation/learnMg.vue index 032917e..c72605d 100644 --- a/src/views/parnerOperation/learnMg.vue +++ b/src/views/parnerOperation/learnMg.vue @@ -226,25 +226,11 @@ import Axios from 'axios' export default { data() { return { + typeId: +this.$route.query.type, headers: { token: sessionStorage.getItem('token') }, nameRepeat: false, - sites: [], - detailStyle: [], - columns: [], - articles: [], - otherArticles: [], - columnProps: { - checkStrictly: true, - value: 'id', - label: 'columnName' - }, - links: [], - article: '', - otherColumns: [], - otherLink: [], - otherArticle: '', form: { id: this.$route.query.id || '', author: '', @@ -260,7 +246,7 @@ export default { summary : '', title: '', fileList: [], - typeId: 1 + typeId: +this.$route.query.type }, rules: { title: [ @@ -344,7 +330,7 @@ export default { }, // 获取所属分类 getClassification() { - this.$post(`${this.api.queryClassificationByType}?typeId=1`).then(({ data }) => { + this.$post(`${this.api.queryClassificationByType}?typeId=${this.typeId}`).then(({ data }) => { this.classifications = data }).catch(err => {}) }, @@ -382,10 +368,10 @@ export default { // 提交所属分类 submitClass(row, showMsg = 1) { if (!row.classificationName) return Util.errorMsg('请输入分类名称') - this.$post(`${this.api.checkForHeavyParnerClass}?classificationName=${row.classificationName}&typeId=1&classificationId=${row.id}`).then(res => { + this.$post(`${this.api.checkForHeavyParnerClass}?classificationName=${row.classificationName}&typeId=${this.typeId}&classificationId=${row.id}`).then(res => { this.$post(this.api[row.id ? 'updateParnerClass' : 'saveParnerClass'], { classificationName: row.classificationName, - typeId: 1, // 类型(1.学习2.资讯) + typeId: this.typeId, // 类型(1.学习2.资讯) id: row.id, }).then(res => { showMsg && Util.successMsg((row.id ? '修改' : '新增') + '成功') @@ -489,7 +475,7 @@ export default { const { title, id } = this.form if(title && title !== this.originalName){ this.$post(this.api.checkIfTheTitleIsRepeat, { - typeId: 1, + typeId: this.typeId, title, id: id || '' }).then(res => { diff --git a/src/views/parnerOperation/mobileRole.vue b/src/views/parnerOperation/mobileRole.vue index 9f2971d..96504ba 100644 --- a/src/views/parnerOperation/mobileRole.vue +++ b/src/views/parnerOperation/mobileRole.vue @@ -2,7 +2,15 @@
- + + + + +
批量删除 @@ -17,8 +25,8 @@ - - + +