| | |
| | | <span>{{ currentEvent.conntinueTime }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="关联店铺" prop="store"> |
| | | <el-select v-model="eventInfoData.store" @change="selectStoreChange" placeholder="请选择关联店铺"> |
| | | <el-select v-model="eventInfoData.store" clearable @change="selectStoreChange" placeholder="请选择关联店铺"> |
| | | <el-option v-for="store in storeList" :value="store.id" :label="store.storeName" :key="store.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | |
| | | export default { |
| | | data() { |
| | | const validatePass = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error("用户密码不能为空")); |
| | | } else { |
| | | if (value.length < 6 || value.length > 16) { |
| | | callback(new Error("用户密码长度不合法")); |
| | | } else { |
| | | const rep = /^\w+$/; |
| | | if (!rep.test(value)) { |
| | | callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | return { |
| | | updatePasswordParam:{ |
| | | newPassword:"", |
| | |
| | | confirmPassword: null |
| | | }, |
| | | passwordRules: { |
| | | newPassword: [{ required: true, trigger: 'blur', message: '密码不能为空' }], |
| | | oldPassword: [{ required: true, trigger: 'blur', message: '新密码不能为空' }], |
| | | confirmPassword: [{ required: true, trigger: 'blur', message: '新密码不能为空' }], |
| | | }, |
| | | newPassword: [ |
| | | {required: true, trigger: 'blur', message: '密码不能为空'}, |
| | | {validator: validatePass, trigger: 'blur'} |
| | | ], |
| | | oldPassword: [ |
| | | {required: true, trigger: 'blur', message: '新密码不能为空'}, |
| | | {validator: validatePass, trigger: 'blur'} |
| | | ], |
| | | confirmPassword: [ |
| | | {required: true, trigger: 'blur', message: '新密码不能为空'}, |
| | | {validator: validatePass, trigger: 'blur'} |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | .catch(err => this.$message.error(err)) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | , |
| | | logout() { |
| | | users.logout() |
| | | .then(() => { |
| | |
| | | { required: true, trigger: "blur", message: '请输入短信标题' }, |
| | | ], |
| | | targetTo: [ |
| | | { required: true , trigger: "blur", message: '请选择接收人' }, |
| | | { required: true , trigger: "blur", message: '请选择接收对象' }, |
| | | ], |
| | | body: [ |
| | | { required: true, trigger: ['blur', 'change'], validator: validateMessageContent } |
| | |
| | | }, |
| | | // 选中id |
| | | handleCheck(data, node) { |
| | | this.checkedList = [] |
| | | node.checkedNodes.forEach(item => { |
| | | if(!item.hasOwnProperty('departType')){ |
| | | this.checkedList.push(item.id) |
| | |
| | | sendMessage(params) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.$emit('closeDialog'); |
| | | this.$emit('closeMyDialog'); |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })); |
| | | } else { |
| | |
| | | </div> |
| | | <div class="find"> |
| | | <el-button type="primary" icon="el-icon-search" @click="getTableData" |
| | | >查询</el-button |
| | | >查询 |
| | | </el-button |
| | | > |
| | | <el-button icon="el-icon-delete-solid" @click="handleReset" |
| | | >重置</el-button |
| | | >重置 |
| | | </el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="isShowDialog = true" |
| | | >添加</el-button |
| | | >添加 |
| | | </el-button |
| | | > |
| | | </div> |
| | | <!-- 数据展示 --> |
| | |
| | | icon="el-icon-delete-solid" |
| | | :underline="false" |
| | | @click="handleDelete([scope.row.id])" |
| | | >删除</el-link |
| | | >删除 |
| | | </el-link |
| | | > |
| | | <el-link |
| | | icon="el-icon-edit" |
| | | class="leftPx" |
| | | :underline="false" |
| | | @click="resend(scope.row)" |
| | | >重新发送</el-link |
| | | >重新发送 |
| | | </el-link |
| | | > |
| | | </div> |
| | | </template> |
| | |
| | | <div class="funs"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()" |
| | | >全选</el-checkbox |
| | | >全选 |
| | | </el-checkbox |
| | | > |
| | | </div> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)" |
| | | >反选</el-checkbox |
| | | >反选 |
| | | </el-checkbox |
| | | > |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | this.$message({ type: "error", message: err }); |
| | | }); |
| | | }) |
| | | .catch((err) => {}); |
| | | .catch((err) => { |
| | | }); |
| | | }, |
| | | // 表格监听 |
| | | tableChange(list) { |
| | |
| | | min-width: 120px; |
| | | padding-left: 15px; |
| | | } |
| | | |
| | | .search, |
| | | .message-status, |
| | | .message-kind { |
| | |
| | | .find { |
| | | margin-left: 15px; |
| | | } |
| | | |
| | | .findBtn { |
| | | line-height: 100px; |
| | | margin-left: 15px; |
| | |
| | | </div> |
| | | <div class="addUser"> |
| | | <el-button class="addBtn" type="primary" @click="dialogCreate = true" |
| | | >新增部门</el-button |
| | | >新增部门 |
| | | </el-button |
| | | > |
| | | <el-dialog |
| | | :visible.sync="dialogCreate" |
| | |
| | | <div class="funs"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()" |
| | | >全选</el-checkbox |
| | | >全选 |
| | | </el-checkbox |
| | | > |
| | | </div> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)" |
| | | >反选</el-checkbox |
| | | >反选 |
| | | </el-checkbox |
| | | > |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | <script> |
| | | import createUser from "./createUser"; |
| | | import updateUser from "./updateUser"; |
| | | |
| | | export default { |
| | | components: { |
| | | createUser, |
| | |
| | | selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 1) { |
| | | this.preMyIdx = list; |
| | | this.mulPut(this.tempList, list); |
| | | } |
| | | if (list === 2) { |
| | | this.preMyIdx = list; |
| | | this.mulPut(this.tempList); |
| | | } |
| | | if (list === 3) { |
| | | this.preMyIdx = list; |
| | | this.mulDelete(this.tempList); |
| | | this.mulDelete(this.tempList, list); |
| | | } |
| | | } else { |
| | | this.myIdx = this.preMyIdx; |
| | |
| | | message: "您还没选中任何数据", |
| | | }); |
| | | } |
| | | }, |
| | | mulPut(idArr, option) { |
| | | const status = option === 1 ? 1 : 0 |
| | | const tag = option === 1 ? "启用" : "禁用" |
| | | let list = JSON.parse(JSON.stringify(this.tableData)) |
| | | list = list.filter(x => idArr.indexOf(x.id) > -1) |
| | | list.forEach(x => x.status = status) |
| | | console.log(list) |
| | | this.$confirm(`您确定要批量${tag}部门吗?`) |
| | | .then((_) => { |
| | | this.$axios({ |
| | | method: "PUT", |
| | | url: "sccg/depart/batch_status", |
| | | data: list |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: `批量${tag}部门成功` |
| | | }) |
| | | this.getUserList() |
| | | } else { |
| | | this.$message({ |
| | | type: "error", |
| | | message: res.message, |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 多条数据删除 |
| | | mulDelete(idArr) { |
| | |
| | | this.getUserList(); |
| | | }); |
| | | }) |
| | | .catch((_) => {}); |
| | | .catch((_) => { |
| | | }); |
| | | }, |
| | | // 修改状态 |
| | | handleChangeStatus(obj) { |
| | |
| | | this.dialogCreate = false; |
| | | done(); |
| | | }) |
| | | .catch((_) => {}); |
| | | .catch((_) => { |
| | | }); |
| | | } else { |
| | | done(); |
| | | } |
| | |
| | | .then((_) => { |
| | | done(); |
| | | }) |
| | | .catch((_) => {}); |
| | | .catch((_) => { |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | |
| | | .funs-sp { |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | |
| | | .el-table { |
| | | color: #4b9bb7; |
| | | font-size: 10px; |
| | | |
| | | .operation { |
| | | display: flex; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // &::v-deep .switchStyle .el-switch__label { |
| | | // position: absolute; |
| | | // display: none; |
| | |
| | | if (!value) { |
| | | callback(new Error("用户密码不能为空")); |
| | | } else { |
| | | if (value.length < 6 || value.length > 16){ |
| | | callback(new Error("用户密码长度不合法")); |
| | | }else { |
| | | const rep = /^\w+$/; |
| | | if (!rep.test(value)) { |
| | | callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串")); |
| | |
| | | callback(); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | const validateTruename = (rule, value, callback) => { |
| | | if (!value) { |