| | |
| | | |
| | | <el-tree |
| | | ref="treeLeftRef" |
| | | key="treeLeftKey" |
| | | style="padding: 10px;overflow: auto;" |
| | | :style="{height:(tableHeight+140)+'px'}" |
| | | :style="{height:(tableHeight+180)+'px'}" |
| | | :data="treeLeft" |
| | | node-key="torg_code" |
| | | highlight-current |
| | |
| | | <el-form-item label="用户名称" style=" display: flex;"> |
| | | <el-input v-model="form.username" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="用户编码" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.usercode" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="用户名称" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.username" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="用户编码" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.usercode" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="用户名称" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.username" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="用户编码" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.usercode" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-show="isExpandForm" label="用户名称" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.username" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | </div> |
| | | <div |
| | | class="bodySearchReset" |
| | |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | style="height: 5px;" |
| | | > |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseout'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"--> |
| | | <!-- @mouseenter="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseenter'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"--> |
| | | <!-- @click="isExpandForm=!isExpandForm"--> |
| | | <!-- @mouseout="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | :height="isExpandForm?tableHeight:(tableHeight+80)+'px'" |
| | | border |
| | | row-class-name="custom-row" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | |
| | | prop="email" |
| | | label="邮箱" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.email ? row.email : '/' }} |
| | |
| | | prop="mobile" |
| | | label="号码" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.mobile ? row.mobile : '/' }} |
| | |
| | | prop="postname" |
| | | label="岗位" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.postname ? row.postname : '/' }} |
| | |
| | | prop="rolename" |
| | | label="角色" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.rolename ? row.rolename : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | prop="group_name" |
| | | label="班组" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.group_name ? row.group_name : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createusername" |
| | | label="创建人员" |
| | | sortable="custom" |
| | | /> |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | } |
| | | } |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | customID: 'torg_code', |
| | | childrenProperty: 'children' |
| | | }) |
| | | |
| | | this.treeLeft = this.cascaderOptions |
| | | this.$nextTick(() => { |
| | | this.treeLeft = this.cascaderOptions |
| | | this.$forceUpdate() |
| | | }) |
| | | }, |
| | | // 岗位 角色 班组 |
| | | async getAllSelectData() { |
| | |
| | | handleClose() { |
| | | this.dialogForm.usercode = '' |
| | | this.dialogForm.username = '' |
| | | this.dialogForm.storg_code = '' |
| | | this.dialogForm.status = 'Y' |
| | | |
| | | this.dialogForm.post_code = [] |
| | |
| | | this.dialogForm.password = '123456' |
| | | this.dialogForm.mobile = '' |
| | | this.dialogForm.email = '' |
| | | |
| | | // this.dialogForm.storg_code = '' |
| | | |
| | | this.$refs.cascader.checkedValue = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | this.dialogForm.group_code = this.dialogForm.group_code.join(',') |
| | | this.dialogForm.post_code = this.dialogForm.post_code.join(',') |
| | | this.dialogForm.role_code = this.dialogForm.role_code.join(',') |
| | | this.dialogForm.storg_code = this.dialogForm.storg_code[this.dialogForm.storg_code.length - 1] |
| | | |
| | | console.log(JSON.parse(JSON.stringify(this.dialogForm))) |
| | | AddUpdateUserSave(this.dialogForm).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.getUserData() |
| | | } else { |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.$notify.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | | }) |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 200 |
| | | this.tableHeight = this.mainHeight - 280 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |