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