重置 密码 权限

This commit is contained in:
shidongli 2022-11-10 18:50:02 +08:00
parent e3cd67cbb7
commit 8003ef4e06
6 changed files with 92 additions and 25 deletions

View File

@ -66,4 +66,4 @@ export function delGoodsInfo(goodsInfoId) {
url: '/system/operateGoodInfo/' + goodsInfoId,
method: 'delete'
})
}
}

View File

@ -63,3 +63,11 @@ export function delPatientArchives(id) {
method: 'delete'
})
}
// 重置密码
export function updatePassword(params) {
return request({
url: '/system/patientArchives/updatePassword',
method: 'post',
params: params
})
}

View File

@ -796,6 +796,7 @@ export default {
created() {
this.getList();
this.info();
this.getList2()
},
methods: {
upwhetherShelf(row) {
@ -933,7 +934,7 @@ export default {
getList2(){
getListByUser(this.nurseStationqueryParams).then((res) => {
this.nursetotal = res.total;
this.nurseStationlist = res.rows;
this.nurseStationlist = res.rows; //
});
},
resetQuery2() {
@ -998,6 +999,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
// if(this.nurseStationlist2)
this.resetForm("queryForm");
this.handleQuery();
},
@ -1154,14 +1156,10 @@ export default {
this.goodsCategorylist = res.rows;
});
getListByUser(this.getListByUserquery).then((res) => {
this.nurseStationlist2 = res.rows;
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
this.total2 = res.total;
} else {
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.id = res.rows[0].id;
this.handleQuery();
}
});
},

View File

@ -8,6 +8,21 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品名称" prop="goodsName">
<el-input
v-model="queryParams.goodsName"
@ -34,10 +49,7 @@
/>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select
v-model="queryParams.goodsPurpose"
placeholder="请选择商品用途"
>
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
<el-option
v-for="item in goods"
:key="item.value"
@ -255,7 +267,6 @@
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select
@ -377,7 +388,7 @@
:visible.sync="innerVisible"
width="1000px"
append-to-body
:before-close="addcancel"
:before-close="addcancel"
>
<el-form
ref="queryForm"
@ -795,7 +806,19 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
if (this.nurseStationlist[0].isAdmin == '1') {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10
}
} else {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10
this.queryParams.goodsName = null
this.queryParams.goodsCategoryName = null
this.queryParams.goodsPurpose = null
}
this.handleQuery();
},
//
@ -841,7 +864,7 @@ export default {
/** 提交按钮 */
submitForm() {
console.log(this.form);
console.log(this.form);
console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists;
@ -862,7 +885,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
this.open = false;
this.open = false;
this.getList();
});
}
@ -884,7 +907,7 @@ export default {
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
});
})
.catch(() => {});
.catch(() => { });
},
// handleDelete(row) {
// const ids = row.id || this.ids;
@ -946,7 +969,7 @@ export default {
} else {
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.id = res.rows[0].id;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
});

View File

@ -197,6 +197,14 @@
v-hasPermi="['system:patientArchives:remove']"
>删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleResetPwd(scope.row)"
v-hasPermi="['system:patientArchives:remove']"
>重置密码</el-button
>
</template>
</el-table-column>
</el-table>
@ -387,16 +395,20 @@
/>
</el-form-item>
<el-form-item label="头像" prop="headPictureUrl">
<img
:src="baseUrl + form.headPictureUrl"
style="width: 200px; height: 200px"
/>
<img
:src="baseUrl + form.headPictureUrl"
style="width: 200px; height: 200px"
/>
<!-- <el-input v-model="form.headPictureUrl" placeholder="请输入个人头像地址" /> -->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top:-50px;margin-right: 40%">
<div
slot="footer"
class="dialog-footer"
style="margin-top: -50px; margin-right: 40%"
>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
@ -414,6 +426,7 @@ import {
FirstLevel,
SecondaryLevelInfo,
getSubordinateRegions,
updatePassword,
} from "@/api/system/patientArchives";
export default {
@ -598,6 +611,31 @@ export default {
// this.areas();
},
methods: {
//
handleResetPwd(row) {
console.log(row)
const id= row.id
console.log(id)
// const id=row.userId
this.$prompt('请输入新的密码', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{5,20}$/,
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
})
.then((res) => {
console.log(res)
const params = {
id,
password: res.value
}
updatePassword(params).then((response) => {
this.$modal.msgSuccess("修改成功,新密码是:" + res.value);
});
})
.catch(() => { });
},
//
province(item) {
console.log(item);
@ -831,7 +869,7 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
.catch(() => { });
},
/** 导出按钮操作 */
handleExport() {

View File

@ -1103,7 +1103,7 @@ export default {
};
this.handleQuery();
} else {
this.queryParams.pageNu = 1;
this.queryParams.pageNum = 1;
this.queryParams.nurseTypeId = null;
this.queryParams.nurseItemCode = null;
this.queryParams.nurseItemName = null;