前端bug修改
This commit is contained in:
parent
b197daef07
commit
9c6cdb4774
|
|
@ -36,4 +36,12 @@ export function updateAttDetailsDataExamine(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出
|
||||
export function exportAttRecord(query) {
|
||||
return request({
|
||||
url: '/system/export/exportAttRecord',
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,23 @@ export function delDept(deptId) {
|
|||
url: '/system/org/' + deptId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 导出
|
||||
export function exportOrg(query) {
|
||||
return request({
|
||||
url: '/system/export/exportOrg',
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//模板下载
|
||||
export function orgTempFile(query) {
|
||||
return request({
|
||||
url: '/system/download/orgFile',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ service.interceptors.request.use(config => {
|
|||
const s_url = sessionObj.url; // 请求地址
|
||||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 3000; // 间隔时间(ms),小于此时间视为重复提交
|
||||
const interval = 2000; // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请勿重复提交';
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<BottomOne :orgNumBean="pageData.orgNumBean"></BottomOne>
|
||||
</div>
|
||||
<div style="width: 48%;margin: 0 1%;height: 100%;">
|
||||
<BottomTwo @openDialog="handleDialog"></BottomTwo>
|
||||
<BottomTwo @openDialog="handleDialog" :pageData="pageData.monthAbnormalTypeBean"></BottomTwo>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -61,11 +61,20 @@ export default {
|
|||
initData(){
|
||||
// console.log(this.orgNumBean,22222222222222)
|
||||
let arr = this.handleTree(this.orgNumBean, "orgId");
|
||||
this.treeData = {
|
||||
orgName:'组织架构',
|
||||
orgId:'0',
|
||||
personNum:'',
|
||||
children:arr
|
||||
if(arr.length>0){
|
||||
this.treeData = {
|
||||
orgName:'组织架构',
|
||||
orgId:'0',
|
||||
personNum:'',
|
||||
children:arr
|
||||
}
|
||||
}else{
|
||||
this.treeData = {
|
||||
orgName:'组织架构',
|
||||
orgId:'0',
|
||||
personNum:'',
|
||||
children:[]
|
||||
}
|
||||
}
|
||||
this.expandChange()
|
||||
},
|
||||
|
|
@ -142,11 +151,13 @@ export default {
|
|||
width: 100%;
|
||||
height: 400px;
|
||||
overflow-x: auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
::v-deep.org-tree-container .org-tree .org-tree-node .org-tree-node-label {
|
||||
white-space: nowrap;
|
||||
white-space: nowrap;
|
||||
font-size: 12px!important;
|
||||
border-radius: 100px!important;
|
||||
}
|
||||
.bg-white {
|
||||
background-color: chocolate;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,27 @@ export default {
|
|||
components: {
|
||||
|
||||
},
|
||||
name: 'topOne',
|
||||
name: 'bottomTwo',
|
||||
props: {
|
||||
pageData: {
|
||||
// required: true,
|
||||
type: Object,
|
||||
default:{
|
||||
addressErrorNum:'0',
|
||||
earlyNum:'0',
|
||||
einErrorNum:'0',
|
||||
lateNum:'0',
|
||||
leaveNum:'0',
|
||||
skippingNum:'0'
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pieCharts: null,
|
||||
dateTime:"",
|
||||
barYData:[22, 18, 11, 23, 29, 33]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -34,6 +50,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getInitData(){
|
||||
console.log(this.pageData)
|
||||
this.barYData=[this.pageData.lateNum,this.pageData.earlyNum,this.pageData.skippingNum,this.pageData.leaveNum,this.pageData.addressErrorNum,this.pageData.einErrorNum]
|
||||
this.initChart()
|
||||
},
|
||||
initChart(){
|
||||
|
|
@ -45,7 +63,7 @@ export default {
|
|||
yAxis: {},
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data:[22, 18, 11, 23, 29, 33]
|
||||
data:this.barYData
|
||||
}]
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ export default {
|
|||
this.initChart()
|
||||
})
|
||||
});
|
||||
|
||||
},
|
||||
initChart(){
|
||||
this.pieCharts = echarts.init(document.getElementById('pieBox'))
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ export default {
|
|||
// required: true,
|
||||
type: Object,
|
||||
default:{
|
||||
processedData:'0',
|
||||
unProcessedData:'0'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ export default {
|
|||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download('/system/download/holidayFile', {}, `请假数据模板_${new Date().getTime()}.xlsx`)
|
||||
// this.download('system/user/importTemplate', {
|
||||
// }, `user_template_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -203,8 +203,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getDetailsList,updateAttDetails } from "@/api/report/attReport";
|
||||
import { getDetailsList,updateAttDetails,exportAttRecord } from "@/api/report/attReport";
|
||||
import { listDept } from "@/api/system/dept";
|
||||
import {downloadFile} from "@/utils/download";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
|
|
@ -373,10 +374,10 @@
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/type/export', {
|
||||
...this.queryParams
|
||||
}, `type_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
exportAttRecord(this.queryParams).then(res => {
|
||||
downloadFile({ fileName: `考勤记录_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参与考勤人员:" prop="checkList">
|
||||
<treeselect v-model="form.checkList" :multiple="true" :flat="true" :options="personOptions" :normalizer="normalizer" placeholder="选择部门和人员" @input="handleSelect"/>
|
||||
<treeselect v-model="form.checkList" :multiple="true" :flat="false" :options="personOptions" :normalizer="normalizer" placeholder="选择部门和人员" @input="handleSelect"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -276,6 +276,7 @@
|
|||
groupName: undefined,
|
||||
orgName: undefined
|
||||
},
|
||||
allCheckList:[],
|
||||
personOptions:[],
|
||||
typeList:[{value:'1',label:'固定班制'},{value:'2',label:'自由工时'}],
|
||||
attDayList:[{id:0,label:'周一'},{id:1,label:'周二'},{id:2,label:'周三'},{id:3,label:'周四'},{id:4,label:'周五'},{id:5,label:'周六'},{id:6,label:'周日'}],
|
||||
|
|
@ -350,6 +351,11 @@
|
|||
//数据操作
|
||||
changeData(data) { // 存在子集就不让禁止,父级让禁止
|
||||
data.map(item => {
|
||||
// if(item.children.length == 0&&item.disabled&&!item.isChecked){
|
||||
// item.isDisabled = true
|
||||
// }else{
|
||||
// item.isDisabled = false
|
||||
// }
|
||||
if (item.disabled) {
|
||||
if (item.isChecked) {
|
||||
item.isDisabled = false
|
||||
|
|
@ -365,11 +371,17 @@
|
|||
},
|
||||
handleSelect(value, instanceId) {
|
||||
console.log('Selected:', value);
|
||||
// 在这里处理选择事件
|
||||
// this.$refs["form"].validateField('checkList');
|
||||
// this.$forceUpdate()
|
||||
// value.forEach(item=>{
|
||||
// if(item.indexOf("|")<0){
|
||||
// console.log(item)
|
||||
// this.checkChild(item)
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** 转换部门数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
|
|
@ -557,4 +569,12 @@
|
|||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
::v-deep .vue-treeselect__value-container{
|
||||
overflow-y: auto!important;
|
||||
max-height: 120px!important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -34,6 +34,10 @@
|
|||
v-hasPermi="['system:org:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['system:org:import']"
|
||||
>导入</el-button>
|
||||
|
|
@ -227,8 +231,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listDept, getDept, delDept, addDept, updateDept,orgPersonSelect } from "@/api/system/dept";
|
||||
import { listDept, getDept, delDept, addDept, updateDept,orgPersonSelect,exportOrg } from "@/api/system/dept";
|
||||
import { getPersonSelect } from "@/api/system/userInfo";
|
||||
import {downloadFile} from "@/utils/download";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -439,6 +444,12 @@ export default {
|
|||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
exportOrg(this.queryParams).then(res => {
|
||||
downloadFile({ fileName: `组织架构_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
})
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "数据导入";
|
||||
|
|
@ -446,6 +457,7 @@ export default {
|
|||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download('/system/download/orgFile', {}, `组织模板_${new Date().getTime()}.xlsx`)
|
||||
// this.download('system/user/importTemplate', {
|
||||
// }, `user_template_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue