This commit is contained in:
2024-04-08 16:42:27 +08:00
parent 52249a690d
commit 619ac16a4e
2 changed files with 58 additions and 15 deletions

View File

@ -52,6 +52,7 @@ const user = {
getInfo().then(res => {
const user = res.user
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
localStorage.setItem('user', JSON.stringify(user))
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)

View File

@ -262,9 +262,25 @@
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="TemporaryStorage"> </el-button>
<el-button type="primary" @click="auditing">审核完成 {{ agreeNumber ? agreeNumber : '0' }} / {{
<el-button type="primary" @click="dialogVisible = true">审核完成 {{ agreeNumber ? agreeNumber : '0' }} / {{
totalNumber ? totalNumber : '0' }}</el-button>
</div>
<el-dialog title="提交审核完成" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
<el-form ref="routeform" :model="routeform" label-width="120px" :rules="rules">
<el-form-item label="节点审核状态" prop="routeCheckStatus">
<el-radio v-model="routeform.routeCheckStatus" label="AGREE">同意</el-radio>
<el-radio v-model="routeform.routeCheckStatus" label="DISAGREE">不同意</el-radio>
</el-form-item>
<el-form-item label="节点审核备注">
<el-input type="textarea" :rows="2" placeholder="请输入节点审核备注" v-model="routeform.routeCheckRemark">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="auditing"> </el-button>
<el-button @click="handleClose"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -283,6 +299,16 @@ export default {
name: "specialDiseaseNode",
data() {
return {
dialogVisible: false,
routeform: {
routeCheckStatus: null,
routeCheckRemark: "",
},
rules: {
routeCheckStatus: [
{ required: true, message: '请选择节点审核状态', trigger: 'change' }
],
},
totalNumber: 0,
agreeNumber: 0,
updata: {
@ -553,22 +579,38 @@ export default {
this.lists.splice(index, 1)
}
},
//
handleClose() {
this.dialogVisible = false
this.routeform = {
routeCheckStatus: '',
routeCheckRemark: "",
}
this.resetForm("routeform");
},
//
auditing() {
const loading = this.$loading({
lock: true,
text: '审核中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
updateRouteCheckStatus({
routeCheckStatus: 'AGREE',
id: this.form.specialDiseaseNodeId
}).then(res => {
if (res.data == 1) {
this.info();
this.$modal.msgSuccess("审核成功!");
loading.close();
this.$refs["routeform"].validate(valid => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '审核中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
updateRouteCheckStatus({
routeCheckStatus: this.routeform.routeCheckStatus,
id: this.form.specialDiseaseNodeId,
routeCheckRemark: this.routeform.routeCheckRemark,
routeCheckPerson: JSON.parse(localStorage.getItem('user')).nickName
}).then(res => {
if (res.data == 1) {
this.info();
this.handleClose()
this.$modal.msgSuccess("审核成功!");
loading.close();
}
})
}
})
},