yxq há 1 mês
ascendente
cometimento
80cbd14da0
3 ficheiros alterados com 32 adições e 20 eliminações
  1. +2
    -0
      SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue
  2. +1
    -1
      SafeCampus.WEB/src/views/userManage/personnel/index.vue
  3. +29
    -19
      SafeCampus.WEB/src/views/violation/analysis/index.vue

+ 2
- 0
SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue Ver ficheiro

@@ -68,6 +68,8 @@ function onOpen(props: FormProps.Base<SysUserPersonnel.SysUserPerInfo>) {
if (props.record.personId) {
//如果传了id,就去请求api获取record
userManagePersonnelApi.detail({ id: props.record.personId }).then((res: any) => {
if (!res.data.majorId) res.data.majorId = "";
if (!res.data.depId) res.data.depId = "";
sysUserProps.record = res.data;
});
}


+ 1
- 1
SafeCampus.WEB/src/views/userManage/personnel/index.vue Ver ficheiro

@@ -46,7 +46,7 @@
</template>
</el-upload>
</el-dropdown-item>
<el-dropdown-item :command="command(scope.row, cmdEnum.UnderpantsUnBinding)">
<el-dropdown-item v-if="scope.row.personSetId" :command="command(scope.row, cmdEnum.UnderpantsUnBinding)">
{{ cmdEnum.UnderpantsUnBinding }}
</el-dropdown-item>
</el-dropdown-menu>


+ 29
- 19
SafeCampus.WEB/src/views/violation/analysis/index.vue Ver ficheiro

@@ -93,25 +93,35 @@ const onTimeSubmit = ()=>{
startTime: timeForm.dateArr[0],
endTime: timeForm.dateArr[1],
}).then((res:any) => {
console.log(res,"....UTF-8''");
const filename:any = ref()
filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]);
filename.value = filename.value.slice(7,-1)
let blobUrl = window.URL.createObjectURL(res.data);
const a = document.createElement('a');
a.style.display = 'none';
a.setAttribute("target", "_blank");
a.download = filename.value
a.href = blobUrl;
a.click();
a.remove();
ElMessage({
message: '导出成功',
type: 'success'
});
closeTime();
});
if(res.headers['content-disposition']){
const filename:any = ref()
filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]);
filename.value = filename.value.slice(7,-1)
let blobUrl = window.URL.createObjectURL(res.data);
const a = document.createElement('a');
a.style.display = 'none';
a.setAttribute("target", "_blank");
a.download = filename.value
a.href = blobUrl;
a.click();
a.remove();
ElMessage({
message: '导出成功',
type: 'success'
});
closeTime();
}else{
const fileReader:any = new FileReader()
fileReader.readAsText(new Blob([res.data], { type: 'application/octet-stream' }), 'utf-8')
fileReader.onload = () => {
const result = JSON.parse(fileReader.result)
ElMessage({
message: result.msg,
type: 'error'
});
}
}
})
} else {
return false;


Carregando…
Cancelar
Guardar