| | |
| | | |
| | | # VUE_APP_API = 'https://dmtest.ahapp.net/preselect_interface/' |
| | | |
| | | VUE_APP_API = 'http://192.168.0.15:10017/' |
| | | VUE_APP_API = 'http://192.168.0.15:10012/' |
| | | |
| | | # VUE_APP_API = 'https://dmtest.ahapp.net/preselect_interface/' |
| | |
| | | "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", |
| | | "dev": true |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "ssri": { |
| | | "version": "8.0.1", |
| | | "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826515595&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "minipass": "^3.1.1" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | |
| | | "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", |
| | | "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", |
| | | "dev": true |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/system/user/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/system/user/companyCreateAnchor', data) |
| | | } |
| | | |
| | | // æ°å»ºåå·¥ |
| | | export function companyCreateUser (data) { |
| | | return request.post('/system/user/companyCreateUser', data) |
| | | } |
| | | |
| | | // ä¿®æ¹åå·¥ä¿¡æ¯ |
| | | export function companyUpdUser (data) { |
| | | return request.post('/system/user/companyUpdUser', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/system/user/companyUpdAnchor', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/system/user/delete/${id}`) |
| | | } |
| | | |
| | | // ä¿®æ¹ç¨æ·ç¶æ |
| | | export function updUserStatus (params) { |
| | | return request.get(`/system/user/updUserStatus`, { params }) |
| | | } |
| | | |
| | | // ä¿®æ¹å¯ç |
| | | export function updPassword (data) { |
| | | return request.post('/system/user/updPassword', data) |
| | | } |
| | |
| | | export function updateDisableById (data) { |
| | | return request.post('/business/category/updateDisableById', data) |
| | | } |
| | | |
| | | // å¹³å°åç±»å表 |
| | | export function baseCategoryList (data) { |
| | | return request.post('/business/category/baseCategoryList', data) |
| | | } |
| | | |
| | | // ä¼ä¸æ°å»ºåç±» |
| | | export function companyCreate (data) { |
| | | return request.post('/business/category/companyCreate', data) |
| | | } |
| | | |
| | | // ä¼ä¸æ ¹æ®IDä¿®æ¹ |
| | | export function companyUpdateById (data) { |
| | | return request.post('/business/category/companyUpdateById', data) |
| | | } |
| | |
| | | return request.post('/business/goods/create', data) |
| | | } |
| | | |
| | | // ä¼ä¸æ°å»ºåå |
| | | export function companyCreate (data) { |
| | | return request.post('/business/goods/companyCreate', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/goods/updateById', data) |
| | | } |
| | | |
| | | // ä¼ä¸æ ¹æ®IDä¿®æ¹ |
| | | export function companyUpdateById (data) { |
| | | return request.post('/business/goods/companyUpdateById', data) |
| | | } |
| | | |
| | | // æ¹éä¿®æ¹ç¶æ |
| | | export function batchUpdateDisableById (data) { |
| | | return request.post('/business/goods/batchUpdateDisableById', data) |
| | | } |
| | | |
| | | // ä»å¹³å°éæ©åå |
| | | export function createPlat (data) { |
| | | return request.post('/business/goods/createPlat', data) |
| | | } |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function pageT (data) { |
| | | return request.post('/business/baseGoods/page', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/goods/delete/${id}`) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // è·åå½åç»å½ä¼ä¸é
ç½®ä¿¡æ¯ |
| | | export function getByLogin (params) { |
| | | return request.get('/business/webParam/getByLogin', {params}) |
| | | } |
| | | |
| | | // æ´æ°ä¼ä¸é
ç½®ä¿¡æ¯ |
| | | export function renew (data) { |
| | | return request.post('/business/webParam/renew', data) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="è¾å
¥æ°å¯ç " prop="password"> |
| | | <el-input v-model="form.password" show-password placeholder="å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="忬¡è¾å
¥å¯ç " prop="qpassword"> |
| | | <el-input v-model="form.qpassword" show-password placeholder="å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½" v-trim /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { updPassword } from '@/api/business/anchor.js' |
| | | |
| | | export default { |
| | | name: 'OperaBrandWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('å¯ç ä¸è½ä¸ºç©º')); |
| | | } else { |
| | | if (!/^(?![^a-zA-Z]+$)(?!\D+$)/.test(value)) { |
| | | callback(new Error('å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | var validatePass1 = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('å¯ç ä¸è½ä¸ºç©º')); |
| | | } else { |
| | | if (value !== this.form.password) { |
| | | callback(new Error('两次è¾å
¥çå¯ç ä¸ä¸è´')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | password: '', |
| | | qpassword: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | password: [ |
| | | { required: true, validator: validatePass, trigger: 'blur' } |
| | | ], |
| | | qpassword: [ |
| | | { required: true, validator: validatePass1, trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | api: '/business/anchor', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | updPassword({ |
| | | id: this.form.id, |
| | | password: this.form.password |
| | | }).then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ç»å½è´¦å·" prop="userName"> |
| | | <el-input v-model="form.userName" :disabled="form.id ? true : false" maxlength="20" placeholder="请è¾å
¥ï¼ä¸è¶
è¿20个å符" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»å½å¯ç " prop="password"> |
| | | <el-input v-model="form.password" :disabled="form.id ? true : false" show-password placeholder="å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="主æå§å" prop="realName"> |
| | | <el-input v-model="form.realName" placeholder="请è¾å
¥ä¸»æå§å" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="ææºå·" prop="mobile"> |
| | | <el-input v-model="form.mobile" maxlength="11" show-word-limit placeholder="请è¾å
¥ææºå·" v-trim /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: 'OperaBrandWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('ç»å½å¯ç ä¸è½ä¸ºç©º')); |
| | | } else { |
| | | if (!/^(?![^a-zA-Z]+$)(?!\D+$)/.test(value)) { |
| | | callback(new Error('å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | var validatePhone = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(); |
| | | } else { |
| | | if (!/^1[3,4,5,6,7,8,9][0-9]{9}$/.test(value)) { |
| | | callback(new Error('ææºå·ç æ ¼å¼ä¸æ£ç¡®ï¼')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | userName: '', |
| | | password: '', |
| | | realName: '', |
| | | mobile: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | userName: [ |
| | | { required: true, message: 'ç»å½è´¦å·ä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | password: [ |
| | | { required: true, validator: validatePass, trigger: 'blur' } |
| | | ], |
| | | realName: [ |
| | | { required: true, message: '主æå§åä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | mobile: [ |
| | | { required: true, validator: validatePhone, trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | api: '/business/anchor', |
| | | 'field.id': 'id' |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-alert title="妿ä»å¹³å°éæ©ååè¿è¡ç´æï¼å»ºè®®ç±»å«éæ©ä»å¹³å°åºéæ©ï¼ç³»ç»å·²åæ°æ®å
³èï¼" type="warning" effect="dark" :closable="false"></el-alert> |
| | | <h3 style="margin: 20px 0 10px 0;">åºæ¬ä¿¡æ¯</h3> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ç±»å«æ¥æº" prop="type"> |
| | | <el-radio-group v-model="form.type" @change="changeRadio"> |
| | | <el-radio :label="1">ä»å¹³å°åºéæ©</el-radio> |
| | | <el-radio :label="0">ä¼ä¸èªå»º</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="éæ©ç±»å«" prop="platCateId" v-if="form.type == 1"> |
| | | <el-select v-model="form.platCateId" placeholder="è¯·éæ©" @change="changeCategory"> |
| | | <el-option |
| | | v-for="item in categoryList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å«åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥ç±»å«åç§°ï¼ä¸è¶
è¿6个å" maxlength="6" v-trim/> |
| | | </el-form-item> |
| | |
| | | :action="action" |
| | | :class="{ hide: hideUpload }" |
| | | :file-list="form.fileList" |
| | | :data="{ folder: 'projects' }" |
| | | :data="{ folder: 'category_img' }" |
| | | list-type="picture-card" |
| | | :limit="1" |
| | | :on-success="fileSuccess" |
| | |
| | | <i class="el-icon-plus"></i> |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ å¾çæ ¼å¼ï¼pngæ ¼å¼ï¼å»ºè®®å°ºå¯¸120*120px</div> |
| | | </el-upload> |
| | | <!-- <el-input v-model="form.imgurl" placeholder="请è¾å
¥å¾æ " v-trim/> --> |
| | | </el-form-item> |
| | | <el-form-item label="æåºç (ååº)" prop="sortnum"> |
| | | <el-input v-model="form.sortnum" placeholder="请è¾å
¥æåºç " v-trim/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="çé屿§1åç§°" prop="attrFirst"> |
| | | <div style="margin: 20px 0 10px 0; height: 30px; display: flex; justify-content: space-between;"> |
| | | <h3 style="display: flex; align-items: flex-end;">忰屿§é
ç½®<h6 style="margin-left: 10px;">é
ç½®å½åç±»å«ç产ååæ°å</h6></h3> |
| | | <el-button style="display: inline-block;" type="primary" v-if="form.type == 0" @click="addItem">+ æ°å¢</el-button> |
| | | </div> |
| | | <el-table |
| | | :data="form.tableData" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column label="åæ°å"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.name" placeholder="请è¾å
¥å
容"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="设置为é项"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.isselect" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦æ¾ç¤º"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.isshow" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" v-if="form.type == 0"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | @click="handleDelete(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- <el-form-item label="çé屿§1åç§°" prop="attrFirst"> |
| | | <el-input v-model="form.attrFirst" maxlength="6" placeholder="请è¾å
¥çé屿§åç§°ï¼ä¸è¶
è¿6个å" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="çé屿§1çå¼" prop="attrFirst"> |
| | |
| | | <div style="display: flex; align-items: center; flex-wrap: wrap;"> |
| | | <el-tag style="margin-right: 10px; margin-top: 10px;" @close="close(index, 3)" closable v-for="(item, index) in form.paramList" :key="index">{{ item.name }}</el-tag> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | |
| | | <h3 style="margin: 20px 0 10px 0; display: flex; align-items: flex-end;">é¢ç®åºé´é
ç½®<h6 style="margin-left: 10px;">é
ç½®å½åç±»å«çé¢ç®åºé´çéå¼ï¼ä¸éåä¸éä¸è½åæ¶ä¸ºç©º</h6></h3> |
| | | <el-form-item label="é¢ç®åºé´" prop="attrSecond"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 10px;" v-for="(item, index) in form.budgetList" :key="index"> |
| | | <el-input v-model="item.minamount" type="number" @input="changeInput(1, index)" placeholder="ä¸é" v-trim/> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { create, updateById } from '@/api/business/category.js' |
| | | import { create, updateById, baseCategoryList, companyCreate, companyUpdateById } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal', |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | |
| | | hideUpload: false, |
| | | categoryList: [], |
| | | |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | type: 1, |
| | | platCateId: '', |
| | | name: '', |
| | | attrFirst: '', |
| | | attrFirst1: '', |
| | | attrFirstList: [], |
| | | attrSecond: '', |
| | | attrSecond1: '', |
| | | attrSecondList: [], |
| | | // attrFirst: '', |
| | | // attrFirst1: '', |
| | | // attrFirstList: [], |
| | | // attrSecond: '', |
| | | // attrSecond1: '', |
| | | // attrSecondList: [], |
| | | sortnum: '', |
| | | parameter: '', |
| | | // parameter: '', |
| | | paramList: [], |
| | | imgurl: '', |
| | | tableData: [], |
| | | budgetList: [ |
| | | { |
| | | maxamount: '', |
| | |
| | | } |
| | | ], |
| | | fileList: [], |
| | | attributeValueOne: [] |
| | | // attributeValueOne: [] |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | addItem() { |
| | | this.form.tableData.push({ name: '', isselect: 0, isshow: 1 }) |
| | | }, |
| | | handleDelete(index) { |
| | | this.form.tableData.splice(index, 1) |
| | | }, |
| | | changeRadio(e) { |
| | | this.form.name = '' |
| | | this.form.platCateId = '' |
| | | this.form.sortnum = '' |
| | | this.form.tableData = [] |
| | | this.form.imgurl = '' |
| | | this.form.fileList = [] |
| | | this.form.budgetList = [{ |
| | | maxamount: '', |
| | | minamount: '' |
| | | }] |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) return |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | if (!this.form.id) { |
| | | companyCreate({ |
| | | paramList: this.form.tableData, |
| | | type: this.form.type, |
| | | sortnum: this.form.sortnum, |
| | | platCateId: this.form.platCateId, |
| | | name: this.form.name, |
| | | imgurl: this.form.imgurl, |
| | | budgetList: this.form.budgetList |
| | | }) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | companyUpdateById({ |
| | | id: this.form.id, |
| | | paramList: this.form.tableData, |
| | | type: this.form.type, |
| | | sortnum: this.form.sortnum, |
| | | platCateId: this.form.platCateId, |
| | | name: this.form.name, |
| | | imgurl: this.form.imgurl, |
| | | budgetList: this.form.budgetList |
| | | }) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('ç¼è¾æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 忢åç±» |
| | | changeCategory(id) { |
| | | this.categoryList.forEach(item => { |
| | | if (item.id === id) { |
| | | this.form.name = item.name |
| | | this.form.sortnum = item.sortnum |
| | | let arr = [] |
| | | item.baseCateParamList.forEach((row, index) => { |
| | | arr.push({ name: row.name, isselect: index <= 1 ? 1 : 0, isshow: 1 }) |
| | | }) |
| | | this.form.tableData = arr |
| | | this.form.imgurl = item.imgurl |
| | | this.form.fileList = [{ url: item.imgfullurl }] |
| | | } |
| | | }) |
| | | }, |
| | | changeInput(type, index) { |
| | | if (type === 1) { |
| | | if (!this.form.budgetList[index].minamount) return |
| | |
| | | message: 'åªè½ä¸ä¼ ä¸ä¸ªå¾æ ' |
| | | }) |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.isWorking = true |
| | | if (!this.form.id) { |
| | | create(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | updateById(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('ç¼è¾æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // confirm() { |
| | | // this.$refs.form.validate((valid) => { |
| | | // if (valid) { |
| | | // this.isWorking = true |
| | | // if (!this.form.id) { |
| | | // create(this.form) |
| | | // .then(() => { |
| | | // this.visible = false |
| | | // this.$tip.apiSuccess('æ°å»ºæå') |
| | | // this.$emit('success') |
| | | // }) |
| | | // .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | // }) |
| | | // .finally(() => { |
| | | // this.isWorking = false |
| | | // }) |
| | | // } else { |
| | | // updateById(this.form) |
| | | // .then(() => { |
| | | // this.visible = false |
| | | // this.$tip.apiSuccess('ç¼è¾æå') |
| | | // this.$emit('success') |
| | | // }) |
| | | // .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | // }) |
| | | // .finally(() => { |
| | | // this.isWorking = false |
| | | // }) |
| | | // } |
| | | // } else { |
| | | // return false; |
| | | // } |
| | | // }); |
| | | // }, |
| | | close(index, type) { |
| | | if (type === 1) { |
| | | this.form.attrFirstList.splice(index, 1) |
| | |
| | | this.form = { |
| | | id: null, |
| | | name: '', |
| | | attrFirst: '', |
| | | attrFirst1: '', |
| | | attrFirstList: [], |
| | | attrSecond: '', |
| | | attrSecond1: '', |
| | | attrSecondList: [], |
| | | type: 1, |
| | | platCateId: '', |
| | | tableData: [], |
| | | // attrFirst: '', |
| | | // attrFirst1: '', |
| | | // attrFirstList: [], |
| | | // attrSecond: '', |
| | | // attrSecond1: '', |
| | | // attrSecondList: [], |
| | | sortnum: '', |
| | | parameter: '', |
| | | paramList: [], |
| | | // parameter: '', |
| | | // paramList: [], |
| | | imgurl: '', |
| | | budgetList: [ |
| | | { |
| | |
| | | } |
| | | ], |
| | | fileList: [], |
| | | attributeValueOne: [] |
| | | // attributeValueOne: [] |
| | | } |
| | | } else { |
| | | // è·ååç±»å表 |
| | | baseCategoryList({}) |
| | | .then(res => { |
| | | this.categoryList = res |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="name1" prop="attrFirstIds" v-if="name1"> |
| | | <!-- <el-form-item :label="name1" prop="attrFirstIds" v-if="name1"> |
| | | <el-select v-model="form.attrFirstIds" multiple placeholder="è¯·éæ©ï¼æ¯æå¤é"> |
| | | <el-option |
| | | v-for="item in form.attrFirstList" |
| | |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="æå¯¼ä»·ï¼å
ï¼" prop="zdPrice"> |
| | | <el-input v-model="form.zdPrice" @input="priceCHANEG(form.zdPrice, 1)" type="number" placeholder="建议å½å
¥æ´æ°ï¼åä½å
" v-trim/> |
| | | </el-form-item> |
| | |
| | | <el-upload |
| | | :action="action" |
| | | :file-list="form.ztList" |
| | | :data="{ folder: 'projects' }" |
| | | :data="{ folder: 'goods_img' }" |
| | | list-type="picture-card" |
| | | :limit="1" |
| | | :on-success="fileSuccess" |
| | |
| | | :action="action" |
| | | :file-list="form.files" |
| | | :multiple="true" |
| | | :data="{ folder: 'projects' }" |
| | | :data="{ folder: 'goods_img' }" |
| | | list-type="picture-card" |
| | | :on-success="fileSuccess1" |
| | | :on-remove="handleRemove1"> |
| | |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ å¾çæ ¼å¼ï¼pngæ ¼å¼ï¼å»ºè®®å°ºå¯¸600*600px</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <template v-if="form.goodsParamList && form.goodsParamList.length > 0"> |
| | | <div style="font-size: 18px;font-weight: bold;">忰屿§å¼é
ç½® <span style="font-size: 13px; font-weight: 500;">æéé
ç½®å½åååç产ååæ°å¼ï¼åä¸ªåæ°å¼ä¸è¶
è¿30个å</span></div> |
| | | <el-form-item :label="item.name" v-for="(item, index) in form.goodsParamList" :key="index"> |
| | | <el-input v-model="item.val" maxlength="30" type="text" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | </template> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { brand } from '@/api/system/common.js' |
| | | import { findListForGoodsId, create, updateById } from '@/api/business/goods.js' |
| | | import { findListForGoodsId, create, updateById, companyCreate, companyUpdateById } from '@/api/business/goods.js' |
| | | export default { |
| | | name: 'OperaGoodsWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal', |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | name1: '', |
| | | name2: '', |
| | | // è¡¨åæ°æ® |
| | |
| | | this.form.attrSecodIds = '' |
| | | } |
| | | if (!this.form.id) { |
| | | create(this.form) |
| | | companyCreate({...this.form, type: 0}) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | updateById(this.form) |
| | | companyUpdateById({...this.form, type: 0}) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('ç¼è¾æå') |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ç»å½è´¦å·" prop="userName"> |
| | | <el-input v-model="form.userName" :disabled="form.id ? true : false" maxlength="20" placeholder="请è¾å
¥ï¼ä¸è¶
è¿20个å符" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»å½å¯ç " prop="password"> |
| | | <el-input v-model="form.password" :disabled="form.id ? true : false" show-password placeholder="å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="åå·¥å§å" prop="realName"> |
| | | <el-input v-model="form.realName" placeholder="请è¾å
¥åå·¥å§å" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="ææºå·" prop="mobile"> |
| | | <el-input v-model="form.mobile" maxlength="11" show-word-limit placeholder="请è¾å
¥ææºå·" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="è§è²" prop="roleId"> |
| | | <el-select v-model="form.roleId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in roleList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { fetchAll } from '@/api/system/role' |
| | | import { companyCreateUser, companyUpdUser } from '@/api/business/anchor' |
| | | |
| | | export default { |
| | | name: 'OperaBrandWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('ç»å½å¯ç ä¸è½ä¸ºç©º')); |
| | | } else { |
| | | if (!/^(?![^a-zA-Z]+$)(?!\D+$)/.test(value)) { |
| | | callback(new Error('å¯ç æ¯ææ°åãå符ç»åï¼é¿åº¦6-18ä½')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | var validatePhone = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(); |
| | | } else { |
| | | if (!/^1[3,4,5,6,7,8,9][0-9]{9}$/.test(value)) { |
| | | callback(new Error('ææºå·ç æ ¼å¼ä¸æ£ç¡®ï¼')); |
| | | } |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | roleList: [], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | userName: '', |
| | | password: '', |
| | | realName: '', |
| | | mobile: '', |
| | | roleId: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | userName: [ |
| | | { required: true, message: 'ç»å½è´¦å·ä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | password: [ |
| | | { required: true, validator: validatePass, trigger: 'blur' } |
| | | ], |
| | | realName: [ |
| | | { required: true, message: '主æå§åä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | mobile: [ |
| | | { validator: validatePhone, trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | api: '/business/anchor', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) return |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | // æ°å»º |
| | | if (!this.form.id) { |
| | | companyCreateUser(this.form) |
| | | .then(res => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | companyUpdUser(this.form) |
| | | .then(res => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('ç¼è¾æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | // è·åææè§è² |
| | | fetchAll() |
| | | .then(res => { |
| | | this.roleList = res |
| | | }) |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ååç±»å«" prop="categoryId"> |
| | | <el-select v-model="form.categoryId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in categoryList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ååèå´" prop="type"> |
| | | <el-radio-group v-model="form.type"> |
| | | <el-radio :label="0">å
¨é¨</el-radio> |
| | | <el-radio :label="1">é¨å</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å ä»·ç³»æ°" prop="rate"> |
| | | <el-input v-model="form.rate" placeholder="å¹³å°éè´ä»·*å ä»·ç³»æ°ï¼ä½ä¸ºåèåºæä»·ï¼å»ºè®®è¾å
¥å¤§äº1çæ°å" v-trim /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 鿩平å°åå --> |
| | | <selectProductItem ref="selectProductItem" @result="result" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import selectProductItem from '@/components/business/selectProductItem' |
| | | import { baseCategoryList } from '@/api/business/category.js' |
| | | import { createPlat } from '@/api/business/goods' |
| | | |
| | | export default { |
| | | name: 'OperaBrandWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, selectProductItem }, |
| | | data() { |
| | | return { |
| | | categoryList: [], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | categoryId: '', |
| | | type: 0, |
| | | rate: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | categoryId: [ |
| | | { required: true, message: 'ååç±»å«ä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | type: [ |
| | | { required: true, message: 'ååèå´ä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ], |
| | | rate: [ |
| | | { required: true, message: 'å ä»·ç³»æ°ä¸è½ä¸ºç©º', trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | api: '/business/anchor', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | result() { |
| | | // this.$emit('success') |
| | | this.$emit('result') |
| | | this.visible = false |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) return |
| | | // æ°å»º |
| | | if (this.form.type == 0) { |
| | | this.isWorking = true |
| | | createPlat({ |
| | | categoryId: this.form.categoryId, |
| | | rate: this.form.rate, |
| | | type: this.form.type |
| | | }).then(res => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | // this.$emit('success') |
| | | this.$emit('result') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | this.$refs.selectProductItem.open('鿩平å°åå', this.form) |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | // è·ååç±»å表 |
| | | baseCategoryList({ type: 1 }) |
| | | .then(res => { |
| | | this.categoryList = res |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" width="70%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <div class="head"> |
| | | <el-form :inline="true" :model="form" class="demo-form-inline"> |
| | | <el-form-item label="åååç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥åååç§°"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å«" prop="categoryId"> |
| | | <el-select v-model="form.categoryId" disabled placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in categoryList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getList">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="tab"> |
| | | <el-table |
| | | :data="tableData" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="id" label="ååID" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="åååç§°/åå·" show-overflow-tooltip min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; align-items: center;"> |
| | | <div style="width: 70px; height: 70px; flex-shrink: 0;"> |
| | | <el-image |
| | | v-if="row.imgurl" |
| | | style="width: 70px; height: 70px" |
| | | :src="row.fullImgUrl" |
| | | fit="cover"></el-image> |
| | | </div> |
| | | {{ row.name }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="brandName" label="åç" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç±»å«" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="zdPrice" label="æå¯¼ä»·ï¼å
ï¼" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="price" label="éè´ä»·ï¼å
ï¼" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column label="å
¥æä»·ï¼å
ï¼" show-overflow-tooltip min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.purchasePrice" placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="page" |
| | | :page-sizes="[10, 20, 30]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { baseCategoryList } from '@/api/business/category.js' |
| | | import { pageT } from '@/api/business/goods' |
| | | import { createPlat } from '@/api/business/goods' |
| | | |
| | | export default { |
| | | name: 'OperaBrandWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | categoryId: '', |
| | | type: 0, |
| | | rate: '', |
| | | name: '', |
| | | goodsParamList: [] |
| | | }, |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0, |
| | | tableData: [], |
| | | categoryList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | api: '/business/anchor', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | pageT({ |
| | | capacity: this.pageSize, |
| | | model: { |
| | | categoryId: this.form.categoryId, |
| | | name: this.form.name |
| | | }, |
| | | page: this.page |
| | | }).then(res => { |
| | | res.records.forEach(item => { |
| | | item.purchasePrice = item.price * this.form.rate |
| | | }) |
| | | this.tableData = res.records |
| | | this.total = res.total |
| | | }) |
| | | }, |
| | | handleCurrentChange(e) { |
| | | this.page = e |
| | | this.getList() |
| | | }, |
| | | handleSizeChange(e) { |
| | | this.pageSize = e |
| | | this.getList() |
| | | }, |
| | | handleSelectionChange(e) { |
| | | let arr = [] |
| | | e.forEach(item => { |
| | | arr.push({ goodsId: item.id, price: item.purchasePrice }) |
| | | }) |
| | | this.form.goodsParamList = arr |
| | | console.log(arr) |
| | | }, |
| | | confirm() { |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | createPlat({ |
| | | categoryId: this.form.categoryId, |
| | | goodsParamList: this.form.goodsParamList, |
| | | rate: this.form.rate, |
| | | type: this.form.type |
| | | }).then(res => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | // this.$emit('success') |
| | | this.$emit('result') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }, |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open(title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form.categoryId = target.categoryId |
| | | this.form.rate = Number(target.rate) |
| | | this.form.type = target.type |
| | | // è·ååç±»å表 |
| | | baseCategoryList({}) |
| | | .then(res => { |
| | | this.categoryList = res |
| | | }) |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .head { |
| | | width: 100%; |
| | | |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['system:user:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="80px" inline> |
| | | <el-form-item label="è´¦å·ä¿¡æ¯" prop="keyword"> |
| | | <el-input v-model="searchForm.keyword" v-trim placeholder="请è¾å
¥ç»å½è´¦å·/å§å" @keypress.enter.native="search"/> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in status" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:user:create', 'system:user:delete']"> |
| | | <li v-permissions="['system:user:create']"><el-button icon="el-icon-plus" type="primary" @click="$refs.OperaAnchorWindow.open('æ°å»ºç¨æ·')">æ°å»º</el-button></li> |
| | | <!-- <li v-permissions="['system:user:delete']"><el-button icon="el-icon-delete" @click="deleteByIdInBatch">å é¤</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | :default-sort = "{prop: 'createTime', order: 'descending'}" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | @sort-change="handleSortChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="username" label="ç»å½è´¦å·"></el-table-column> |
| | | <el-table-column prop="realname" label="å§å"></el-table-column> |
| | | <el-table-column prop="mobile" label="ææºå·"></el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | @change="changeStatus($event, row.id)" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['system:user:update', 'system:user:createUserRole', 'system:user:resetPwd', 'system:user:delete'])" |
| | | label="æä½" |
| | | width="230" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="edit(row)" v-permissions="['system:user:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="editPass(row)" v-permissions="['system:user:resetPwd']">ä¿®æ¹å¯ç </el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:user:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaAnchorWindow ref="OperaAnchorWindow" @success="handlePageChange"/> |
| | | <!-- ä¿®æ¹å¯ç --> |
| | | <OperaAnchorPassWindow ref="OperaAnchorPassWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import OperaAnchorWindow from '@/components/business/OperaAnchorWindow' |
| | | import OperaAnchorPassWindow from '@/components/business/OperaAnchorPassWindow' |
| | | import { updUserStatus } from '@/api/business/anchor.js' |
| | | |
| | | export default { |
| | | name: 'SystemUser', |
| | | extends: BaseTable, |
| | | components: { OperaAnchorWindow, TableLayout, Pagination, OperaAnchorPassWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | status: '', |
| | | keyword: '', |
| | | type: 2 |
| | | }, |
| | | status: [ |
| | | { name: 'å¯ç¨', id: 0 }, |
| | | { name: 'ç¦ç¨', id: 1 } |
| | | ] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç¨æ·', |
| | | api: '/business/anchor', |
| | | 'field.main': 'realname', |
| | | sorts: [{ |
| | | property: 'CREATE_TIME', |
| | | direction: 'DESC' |
| | | }] |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | editPass(row) { |
| | | let obj = { |
| | | id: row.id |
| | | } |
| | | this.$refs.OperaAnchorPassWindow.open('ä¿®æ¹å¯ç ', obj) |
| | | }, |
| | | // ä¿®æ¹ç¶æ |
| | | changeStatus(status, id) { |
| | | updUserStatus({ id, status }) |
| | | .then(res => { |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | edit(row) { |
| | | let obj = { |
| | | id: row.id, |
| | | userName: row.username, |
| | | password: row.password, |
| | | realName: row.realname, |
| | | mobile: row.mobile |
| | | } |
| | | this.$refs.OperaAnchorWindow.open('ç¼è¾ç¨æ·', obj) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | @import "@/assets/style/variables.scss"; |
| | | // å表头åå¤ç |
| | | .table-column-avatar { |
| | | img { |
| | | width: 48px; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="ç±»å«åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="attrFirst" label="屿§1" min-width="100px"></el-table-column> |
| | | <el-table-column prop="attrSecond" label="屿§2" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç (ååº)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" min-width="100px"> |
| | |
| | | paramList: res.paramList, |
| | | imgurl: res.imgurl, |
| | | budgetList: res.budgetList, |
| | | type: res.type, |
| | | platCateId: res.platCateId, |
| | | tableData: res.paramList.map(item => { |
| | | return { |
| | | name: item.name, |
| | | isselect: item.isselect, |
| | | isshow: item.isshow |
| | | } |
| | | }), |
| | | fileList: res.imgurl ? [ {url: res.prefixUrl + res.imgurl} ] : [] |
| | | } |
| | | console.log(obj) |
| | | this.$refs.operaCategoryWindow.open('ç¼è¾ç±»å«', obj) |
| | | }) |
| | | } |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:goods:create', 'business:goods:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaGoodsWindow.open('æ°å»ºåå')" icon="el-icon-plus" v-permissions="['business:goods:create']">æ°å»º</el-button></li> |
| | | <el-button type="primary" :loading="isWorking.export" @click="$refs.selectProduct.open('鿩平å°åå')">鿩平å°åå</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:goods:exportExcel']" @click="importFile">导å
¥</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" @click="downloadFile">ä¸è½½æ¨¡æ¿</el-button> |
| | | |
| | | <el-button type="primary" :loading="isWorking.export" @click="bulkOperation(0)">æ¹é䏿¶</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" @click="bulkOperation(1)">æ¹é䏿¶</el-button> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:goods:delete']">å é¤</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | |
| | | border |
| | | :header-cell-style="rowStyle" |
| | | :cell-style="rowStyle" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="id" label="ååID" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="åååç§°/åå·" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="brandName" label="åç" min-width="100px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç±»å«" min-width="100px"></el-table-column> |
| | | <el-table-column prop="attrFirstNames" label="屿§1" min-width="100px"></el-table-column> |
| | | <el-table-column prop="attrSecodNames" label="屿§2" min-width="100px"></el-table-column> |
| | | <el-table-column prop="zdPrice" label="æå¯¼ä»·ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="baseZdPrice" label="æå¯¼ä»·ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="basePrice" label="éè´ä»·(å
)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="price" label="å
¥æä»·ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" min-width="100px"> |
| | |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaGoodsWindow ref="operaGoodsWindow" @success="handlePageChange"/> |
| | | <!-- 鿩平å°åå --> |
| | | <selectProduct ref="selectProduct" @success="handlePageChange" @result="search"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaGoodsWindow from '@/components/business/OperaGoodsWindow' |
| | | import selectProduct from '@/components/business/selectProduct' |
| | | import { brand, category, importExcel } from '@/api/system/common.js' |
| | | import { updateDisableById, queryById, exportDoc } from '@/api/business/goods.js' |
| | | import { updateDisableById, queryById, exportDoc, batchUpdateDisableById } from '@/api/business/goods.js' |
| | | export default { |
| | | name: 'Goods', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow }, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, selectProduct }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | |
| | | categoryId: '', |
| | | brandId: '' |
| | | }, |
| | | ids: '', |
| | | categoryList: [], |
| | | brandList: [], |
| | | statusList: [ |
| | |
| | | this.getcategory() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(e) { |
| | | let arr = e.map(item => item.id) |
| | | this.ids = arr.join(',') |
| | | console.log(this.ids) |
| | | }, |
| | | // æ¹éä¸ä¸æ¶ |
| | | bulkOperation(type) { |
| | | if (!this.ids) { |
| | | this.$message.warning({ message: 'è³å°éæ©ä¸é¡¹å
容' }) |
| | | return |
| | | } |
| | | batchUpdateDisableById({ |
| | | ids: this.ids, |
| | | status: type |
| | | }).then(res => { |
| | | this.$message.success({ message: res }) |
| | | this.search() |
| | | }) |
| | | }, |
| | | downloadFile() { |
| | | // window.open(`${process.env.VUE_APP_API_PREFIX}/business/goods/export`) |
| | | exportDoc({}) |
| | | .then(response => { |
| | | this.download(response) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="pz"> |
| | | <div class="pz_head">åºæ¬ä¿¡æ¯</div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">å
容èå´å°ºå¯¸ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-input v-model="from.rangeSize" placeholder="æ¯æ750px-1200px"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">主è²è²å¼ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-color-picker v-model="from.mainColor"></el-color-picker> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">èæ¯å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :limit="1" |
| | | :on-exceed="exceed" |
| | | :file-list="fileList1" |
| | | :on-success="fileSuccess1" |
| | | :on-remove="handleRemove1"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">é¡¶é¨å®£ä¼ å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :on-exceed="exceed" |
| | | :file-list="fileList2" |
| | | :on-success="fileSuccess2" |
| | | :on-remove="handleRemove2"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">PKå°å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :on-exceed="exceed" |
| | | :file-list="fileList3" |
| | | :on-success="fileSuccess3" |
| | | :on-remove="handleRemove3"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="pz_footer"> |
| | | <el-button type="primary" @click="submit">ä¿å</el-button> |
| | | <el-button>è¿å</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getByLogin, renew } from '@/api/business/page.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | from: { |
| | | rangeSize: '', |
| | | mainColor: '', |
| | | bgImg: '', |
| | | topImg: '', |
| | | pkImg: '' |
| | | }, |
| | | fileList1: [], |
| | | fileList2: [], |
| | | fileList3: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getDesc() |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | renew(this.from) |
| | | .then(res => { |
| | | this.$message.success({ message: 'ä¿åæå' }) |
| | | }) |
| | | }, |
| | | getDesc() { |
| | | getByLogin({}) |
| | | .then(res => { |
| | | if (res) { |
| | | this.from.rangeSize = res.rangeSize |
| | | this.from.mainColor = res.mainColor |
| | | if (res.bgImg) { |
| | | this.from.bgImg = res.bgImg |
| | | this.fileList1 = [{ name: res.bgImg, url: res.resourcePath + res.bgImg }] |
| | | } |
| | | if (res.topImg) { |
| | | this.fileList2 = [] |
| | | this.from.topImg = res.topImg |
| | | let arr = res.topImg.split(',').map(item => item) |
| | | arr.forEach(item => { |
| | | this.fileList2.push({ name: item, url: res.resourcePath + item }) |
| | | }) |
| | | } |
| | | if (res.pkImg) { |
| | | this.fileList3 = [] |
| | | this.from.pkImg = res.pkImg |
| | | let arr = res.pkImg.split(',').map(item => item) |
| | | arr.forEach(item => { |
| | | this.fileList3.push({ name: item, url: res.resourcePath + item }) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | exceed() { |
| | | this.$message.warning({ message: 'åªè½ä¸ä¼ ä¸å¼ å¾ç' }) |
| | | }, |
| | | |
| | | handleRemove1(file, fileList) { |
| | | this.fileList1 = [] |
| | | this.from.bgImg = '' |
| | | }, |
| | | fileSuccess1(response) { |
| | | this.fileList1.push({ name: response.data.imgaddr, url: response.data.url }) |
| | | this.from.bgImg = response.data.imgaddr |
| | | }, |
| | | |
| | | handleRemove2(file, fileList) { |
| | | this.fileList2.forEach((item, index) => { |
| | | if (file.name === item.name) { |
| | | this.fileList2.splice(index, 1) |
| | | } |
| | | }) |
| | | let arr = this.fileList2.map(item => item.name) |
| | | this.from.topImg = arr.join(',') |
| | | }, |
| | | fileSuccess2(response) { |
| | | this.fileList2.push({ name: response.data.imgaddr, url: response.data.url }) |
| | | let arr = this.fileList2.map(item => item.name) |
| | | this.from.topImg = arr.join(',') |
| | | }, |
| | | |
| | | handleRemove3(file, fileList) { |
| | | this.fileList3.forEach((item, index) => { |
| | | if (file.name === item.name) { |
| | | this.fileList3.splice(index, 1) |
| | | } |
| | | }) |
| | | let arr = this.fileList3.map(item => item.name) |
| | | this.from.pkImg = arr.join(',') |
| | | }, |
| | | fileSuccess3(response) { |
| | | this.fileList3.push({ name: response.data.imgaddr, url: response.data.url }) |
| | | let arr = this.fileList3.map(item => item.name) |
| | | this.from.pkImg = arr.join(',') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .pz { |
| | | width: 100%; |
| | | padding: 30px; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | .pz_head { |
| | | font-size: 20px; |
| | | margin-bottom: 30px; |
| | | font-weight: bold; |
| | | } |
| | | .pz_item { |
| | | width: 750px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 30px; |
| | | .pz_item_label { |
| | | width: 140px; |
| | | flex-shrink: 0; |
| | | font-size: 16px; |
| | | text-align: right; |
| | | } |
| | | .pz_item_ipt { |
| | | flex: 1; |
| | | } |
| | | } |
| | | .pz_footer { |
| | | width: 100%; |
| | | padding-left: 140px; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['system:user:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="80px" inline> |
| | | <el-form-item label="è´¦å·ä¿¡æ¯" prop="keyword"> |
| | | <el-input v-model="searchForm.keyword" v-trim placeholder="请è¾å
¥ç»å½è´¦å·/å§å" @keypress.enter.native="search"/> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in status" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:user:create', 'system:user:delete']"> |
| | | <li v-permissions="['system:user:create']"><el-button icon="el-icon-plus" type="primary" @click="$refs.OperaStaffWindow.open('æ°å»ºç¨æ·')">æ°å»º</el-button></li> |
| | | <!-- <li v-permissions="['system:user:delete']"><el-button icon="el-icon-delete" @click="deleteByIdInBatch">å é¤</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | :default-sort = "{prop: 'createTime', order: 'descending'}" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | @sort-change="handleSortChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="username" label="ç»å½è´¦å·"></el-table-column> |
| | | <el-table-column prop="realname" label="å§å"></el-table-column> |
| | | <el-table-column prop="mobile" label="ææºå·"></el-table-column> |
| | | <el-table-column prop="roles" label="è§è²"> |
| | | <template slot-scope="{row}"> |
| | | <ul> |
| | | <li style="padding: 0px 5px; background-color: #ececec; border-radius: 8px; display: inline-block; margin-right: 10px;" v-for="role in row.roles" :key="role.id">{{role.name}}</li> |
| | | </ul> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | @change="changeStatus($event, row.id)" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['system:user:update', 'system:user:createUserRole', 'system:user:resetPwd', 'system:user:delete'])" |
| | | label="æä½" |
| | | width="230" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="edit(row)" v-permissions="['system:user:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="editPass(row)" v-permissions="['system:user:resetPwd']">ä¿®æ¹å¯ç </el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:user:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaStaffWindow ref="OperaStaffWindow" @success="handlePageChange"/> |
| | | <!-- ä¿®æ¹å¯ç --> |
| | | <OperaAnchorPassWindow ref="OperaAnchorPassWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import OperaStaffWindow from '@/components/business/OperaStaffWindow' |
| | | import OperaAnchorPassWindow from '@/components/business/OperaAnchorPassWindow' |
| | | import { updUserStatus } from '@/api/business/anchor.js' |
| | | |
| | | export default { |
| | | name: 'SystemUser', |
| | | extends: BaseTable, |
| | | components: { OperaStaffWindow, OperaAnchorPassWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | status: '', |
| | | keyword: '', |
| | | type: 1 |
| | | }, |
| | | status: [ |
| | | { name: 'å¯ç¨', id: 0 }, |
| | | { name: 'ç¦ç¨', id: 1 } |
| | | ] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç¨æ·', |
| | | api: '/business/anchor', |
| | | 'field.main': 'realname', |
| | | sorts: [{ |
| | | property: 'CREATE_TIME', |
| | | direction: 'DESC' |
| | | }] |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | editPass(row) { |
| | | let obj = { |
| | | id: row.id |
| | | } |
| | | this.$refs.OperaAnchorPassWindow.open('ä¿®æ¹å¯ç ', obj) |
| | | }, |
| | | // ä¿®æ¹ç¶æ |
| | | changeStatus(status, id) { |
| | | updUserStatus({ id, status }) |
| | | .then(res => { |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | edit(row) { |
| | | let obj = { |
| | | id: row.id, |
| | | userName: row.username, |
| | | password: row.password, |
| | | realName: row.realname, |
| | | mobile: row.mobile, |
| | | roleId: row.roles.length > 0 ? row.roles[0].id : null |
| | | } |
| | | this.$refs.OperaStaffWindow.open('ç¼è¾ç¨æ·', obj) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | @import "@/assets/style/variables.scss"; |
| | | // å表头åå¤ç |
| | | .table-column-avatar { |
| | | img { |
| | | width: 48px; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | row-key="id" |
| | | stripe |
| | | default-expand-all |
| | | :default-expand-all="false" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" fixed="left"></el-table-column> |