| | |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | <span>{{ formatTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <treeselect |
| | | v-model="deptIds" |
| | | v-model="form.depts" |
| | | :options="deptOptions" |
| | | :multiple="true" |
| | | :show-count="true" |
| | | placeholder="请选择归属部门" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-form-item label="适用科室" prop="region"> |
| | | <el-cascader |
| | | style="width: 478px" |
| | | v-model="form.leaveldeptcodes" |
| | | :options="deptOptions" |
| | | :props="props" |
| | | :show-all-levels="false" |
| | | clearable |
| | | > |
| | | <template slot-scope="{ node, data }"> |
| | | <span>{{ data.label }}</span> |
| | | <span v-if="!node.isLeaf"> |
| | | ({{ data.children.length }}) |
| | | </span> |
| | | </template> |
| | | </el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="适用院区" prop="region"> |
| | | <el-cascader |
| | | style="width: 478px" |
| | | v-model="form.leavehospitaldistrictcodes" |
| | | :options="deptOptions" |
| | | :props="props" |
| | | :show-all-levels="false" |
| | | clearable |
| | | > |
| | | <template slot-scope="{ node, data }"> |
| | | <span>{{ data.label }}</span> |
| | | <span v-if="!node.isLeaf"> |
| | | ({{ data.children.length }}) |
| | | </span> |
| | | </template> |
| | | </el-cascader> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="手机号码" prop="phonenumber"> |
| | |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | props: { multiple: true, value: "id", label: "label" }, |
| | | // 用户导入参数 |
| | | upload: { |
| | | // 是否显示弹出层(用户导入) |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | getUser().then((response) => { |
| | | this.postOptions = response.posts; |
| | | this.roleOptions = response.roles; |
| | | this.open = true; |
| | | this.open = true; |
| | | this.title = "添加用户"; |
| | | this.form.password = this.initPassword; |
| | | }); |
| | | this.form.depts = []; |
| | | // getUser().then((response) => { |
| | | // this.postOptions = response.posts; |
| | | // this.roleOptions = response.roles; |
| | | |
| | | // }); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | const userId = row.userId || this.ids; |
| | | getUser(userId).then((response) => { |
| | | this.form = response.data; |
| | | |
| | | this.form.leaveldeptcodes = JSON.parse(this.form.hospInfo); |
| | | this.form.leavehospitaldistrictcodes = JSON.parse(this.form.deptInfo); |
| | | this.postOptions = response.posts; |
| | | this.roleOptions = response.roles; |
| | | this.$set(this.form, "postIds", response.postIds); |
| | |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm: function () { |
| | | this.form.hospInfo = JSON.stringify(this.form.leaveldeptcodes); |
| | | this.form.deptInfo = JSON.stringify(this.form.leavehospitaldistrictcodes); |
| | | this.form.leaveldeptcodes = this.form.leaveldeptcodes.map( |
| | | (subArr) => subArr[subArr.length - 1] |
| | | ); |
| | | this.form.leavehospitaldistrictcodes = this.form.leavehospitaldistrictcodes.map( |
| | | (subArr) => subArr[subArr.length - 1] |
| | | ); |
| | | |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |