|
@@ -919,6 +919,37 @@
|
|
<el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
|
|
<el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</p>
|
|
</p>
|
|
|
|
+ <div style="display: flex;justify-content: end;">
|
|
|
|
+ <el-link type="primary" @click="toView()">查看工时导入记录</el-link>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!-- 工时导入记录弹窗 -->
|
|
|
|
+ <el-dialog title="工时导入记录" v-loading="toViewloading" :visible.sync="toViewDialogVisible" width="400" :before-close="handleClose">
|
|
|
|
+ <div style="height: 452px">
|
|
|
|
+ <el-table :data="toViewList" stripe style="width: 100%;" height="400">
|
|
|
|
+ <el-table-column prop="indate" label="导入时间"> </el-table-column>
|
|
|
|
+ <el-table-column prop="userName" label="操作人"> </el-table-column>
|
|
|
|
+ <el-table-column prop="datel" label="文件">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-link type="primary" @click="addUpload(scope.row)">{{scope.row.fileName}}</el-link>
|
|
|
|
+ <!-- <el-link type="primary" :href="'http://localhost:10086/upload/'+ scope.row.serverName">{{scope.row.fileName}}</el-link> -->
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <el-col :span="24" class="paginatis">
|
|
|
|
+ <el-pagination
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :page-sizes="[20 , 50 , 80 , 100]"
|
|
|
|
+ :page-size="20"
|
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
|
+ :total="toViewForm.total"
|
|
|
|
+ style="float:right;"
|
|
|
|
+ ></el-pagination>
|
|
|
|
+ </el-col>
|
|
|
|
+ </div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!--基于企业微信考勤数据的工时导入 -->
|
|
<!--基于企业微信考勤数据的工时导入 -->
|
|
@@ -1188,7 +1219,15 @@
|
|
zhoBaoIdx: '',
|
|
zhoBaoIdx: '',
|
|
zhoBaoName: '',
|
|
zhoBaoName: '',
|
|
zhis: {},
|
|
zhis: {},
|
|
- dealList: []
|
|
|
|
|
|
+ dealList: [],
|
|
|
|
+ toViewDialogVisible: false,
|
|
|
|
+ toViewList: [],
|
|
|
|
+ toViewloading: true,
|
|
|
|
+ toViewForm: {
|
|
|
|
+ pageIndex: '1',
|
|
|
|
+ pageSize: '20',
|
|
|
|
+ total: 0,
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
@@ -1216,6 +1255,16 @@
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ addUpload(data) {
|
|
|
|
+ var zhi = data.fileName.split('.')[0]
|
|
|
|
+ var sss = zhi + '.xlsx'
|
|
|
|
+ var filePath = '/upload/' + data.serverName;
|
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
|
+ a.setAttribute('download', sss);// download属性
|
|
|
|
+ a.setAttribute('href', filePath);// href链接
|
|
|
|
+ a.click(); //自执行点击事件
|
|
|
|
+ a.remove();
|
|
|
|
+ },
|
|
restrictNumber(targetId) {
|
|
restrictNumber(targetId) {
|
|
let inpu = document.getElementById(targetId).getElementsByTagName('input')[0];
|
|
let inpu = document.getElementById(targetId).getElementsByTagName('input')[0];
|
|
inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
|
|
inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
|
|
@@ -4134,8 +4183,40 @@
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 查看工时记录弹窗
|
|
|
|
+ toView() {
|
|
|
|
+ this.toViewDialogVisible = true
|
|
|
|
+ this.toViewloading = true
|
|
|
|
+ this.getToView()
|
|
|
|
+ },
|
|
|
|
+ getToView() {
|
|
|
|
+ this.http.post( '/report-import-log/getList', this.toViewForm,
|
|
|
|
+ res => {
|
|
|
|
+ this.toViewloading = false;
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ console.log(res.data, '数据数据')
|
|
|
|
+ this.toViewList = res.data.records
|
|
|
|
+ this.toViewForm.total = res.data.total
|
|
|
|
+ } else {
|
|
|
|
+ this.toViewloading = false;
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //分页
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.toViewForm.pageIndex = val;
|
|
|
|
+ this.getToView();
|
|
|
|
+ },
|
|
|
|
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ this.toViewForm.pageSize = val;
|
|
|
|
+ this.getToView();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
let height = window.innerHeight;
|
|
let height = window.innerHeight;
|
|
@@ -4144,7 +4225,7 @@
|
|
window.onresize = function temp() {
|
|
window.onresize = function temp() {
|
|
that.tableHeight = window.innerHeight - 178;
|
|
that.tableHeight = window.innerHeight - 178;
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+ this.toViewForm.companyId = this.user.companyId
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
var now = new Date();
|
|
var now = new Date();
|
|
@@ -4163,6 +4244,10 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.paginatis {
|
|
|
|
+ padding: 10px 10px;
|
|
|
|
+ background: #f2f2f2;
|
|
|
|
+}
|
|
.waiting {
|
|
.waiting {
|
|
color:orange;
|
|
color:orange;
|
|
}
|
|
}
|