Browse Source

修改

dev_kxc
xzt 10 months ago
parent
commit
187c5f59d0
  1. 7
      jwtech-admin-page/src/api/build/sectionInfo.js
  2. 7
      jwtech-admin-page/src/components/map/index.vue
  3. 6
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/clockingIn.vue
  4. 20
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/jlProjectmanager.vue
  5. 3
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/realNameSystem.vue
  6. 20
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/sgProjectmanager.vue
  7. 21
      jwtech-admin-page/src/views/building/peasantWorkerSystem/options/specificMarginAccount.vue
  8. 269
      jwtech-admin-page/src/views/building/projectInfo/projectProcess/baseMsg/options/sectionProject.vue
  9. 4
      jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/warning/options/preparationForConstruction.vue

7
jwtech-admin-page/src/api/build/sectionInfo.js

@ -1,5 +1,12 @@
import request from '@/utils/request'
// 批量导入模版
export function tagTemplate(id) {
return request({
url: '/build/sectionInfo/exportTemplate',
method: 'get'
})
}
// 查询标段基本信息管理列表
export function listSectionInfo(query) {
return request({

7
jwtech-admin-page/src/components/map/index.vue

@ -819,15 +819,14 @@ export default {
//
handleSaveCoords() {
this.all_point_coords = this.pointVectorSource
.getFeatures()
.map((item) => item.geometryChangeKey_.target.flatCoordinates);
if (this.all_point_coords.length == 0 && this.all_line_coords == 0) {
this.$message.warning("暂无需要保存数据");
return;
}
this.all_point_coords = this.pointVectorSource
.getFeatures()
.map((item) => item.geometryChangeKey_.target.flatCoordinates);
let lineArr = [];
let dataArr = this.lineVectorSource.getFeatures();

6
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/clockingIn.vue

@ -312,10 +312,12 @@
icon="el-icon-download"
size="mini"
@click="importTemplate"
style="font-size: 14px"
>模版下载</el-button
>
<span style="color: red; margin-left: 20px"
>提示仅允许导入xlsxlsx格式文件</span
<span style="font-size: 16px; color: red; margin-left: 20px"
>提示仅允许导入xlsxlsx格式文件
需要优先在农民工花名册中导入农民工信息</span
>
</div>
</el-upload>

20
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/jlProjectmanager.vue

@ -508,6 +508,26 @@ export default {
recordClose() {
this.recordForm = {};
},
handleDeleteRecord(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delSupervisorAttendance(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
/** 查询项目管理人员列表 */
getList() {
this.loading = true;

3
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/realNameSystem.vue

@ -638,9 +638,10 @@
icon="el-icon-download"
size="mini"
@click="importTemplate"
style="font-size: 14px"
>模版下载</el-button
>
<span style="color: red; margin-left: 20px"
<span style="font-size: 16px; color: red; margin-left: 20px"
>提示仅允许导入xlsxlsx格式文件</span
>
</div>

20
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/sgProjectmanager.vue

@ -509,6 +509,26 @@ export default {
recordClose() {
this.recordForm = {};
},
handleDeleteRecord(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delConstructionAttendance(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
/** 查询项目管理人员列表 */
getList() {
this.loading = true;

21
jwtech-admin-page/src/views/building/peasantWorkerSystem/options/specificMarginAccount.vue

@ -833,7 +833,26 @@ export default {
recordClose() {
this.recordForm = {};
},
handleDeleteRecord() {},
handleDeleteRecord(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delGzbzj(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
/** 查询农民工工资专用账户列表 */
getList() {
this.loading = true;

269
jwtech-admin-page/src/views/building/projectInfo/projectProcess/baseMsg/options/sectionProject.vue

@ -55,6 +55,16 @@
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-folder-add"
size="mini"
@click="openAddAll"
v-hasPermi="['build:sectionInfo:addAll']"
>批量导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
@ -66,6 +76,7 @@
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -1048,12 +1059,82 @@
@getMapData="getMapData"
/>
</el-dialog>
<!-- 添加或修改农民工考勤表对话框 -->
<el-dialog
title="批量导入"
:visible.sync="uploadParams.addAllOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
@closed="closeTemplate"
class="templateDialog"
>
<!-- 限制文件格式 -->
<!-- accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" -->
<el-upload
ref="uploadTemplate"
class="upload-template"
:action="uploadParams.url"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
:headers="uploadParams.headers"
:on-change="handleChangetem"
:on-remove="handleRemove"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:data="{ proNo: proNo, proCode: proCode }"
:disabled="uploadParams.isUploading"
:auto-upload="false"
:file-list="uploadParams.templateList"
drag
multiple
>
<!-- :show-file-list="false" -->
<!-- <el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button> -->
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<!-- 将文件拖到此处 -->
<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip">
<el-button
type="text"
icon="el-icon-download"
size="mini"
@click="importTemplate"
style="font-size: 14px"
>模版下载</el-button
>
<span style="font-size: 16px; color: red; margin-left: 20px"
>提示仅允许导入xlsxlsx格式文件</span
>
</div>
</el-upload>
<el-table
:data="uploadParams.tableData"
style="width: 100%"
max-height="250"
>
<el-table-column prop="sectionName" label="标段名称" />
<el-table-column prop="projectName" label="项目名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitTemplate"> </el-button>
<el-button @click="cancelTemplate"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import mapEle from "@/components/map/index.vue";
import {
tagTemplate,
listSectionInfo,
getSectionInfo,
delSectionInfo,
@ -1064,6 +1145,7 @@ import {
import { getInfo } from "@/api/build/projectInfo";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
import { getToken } from "@/utils/auth";
export default {
name: "SectionInfo",
@ -1071,6 +1153,24 @@ export default {
props: ["proNo", "proCode", "projectName"],
data() {
return {
//
uploadParams: {
// templateList: [],
//
addAllOpen: false,
//
isUploading: false,
//
updateSupport: 0,
//
headers: {
jianwei: "jwtech " + getToken(),
},
//
url: "thinking/build/sectionInfo/importData",
tableData: [],
fileTemp: null,
},
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
@ -1548,6 +1648,170 @@ export default {
},
},
methods: {
// excel
handleRemove(file, fileList) {
// console.log(11111111);
this.uploadParams.fileTemp = null;
},
// excel
handleChangetem(file, fileList) {
// console.log(22222222, file);
if (file.status !== "ready") return;
this.uploadParams.fileTemp = file.raw;
// console.log(this.uploadParams.fileTemp);
//
if (this.uploadParams.fileTemp) {
if (
this.uploadParams.fileTemp.type ==
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
this.uploadParams.fileTemp.type == "application/vnd.ms-excel"
) {
this.importfxx(this.uploadParams.fileTemp);
} else {
this.$message({
type: "warning",
message: "附件格式错误,请删除后重新上传!",
});
}
} else {
this.$message({
type: "warning",
message: "请上传附件!",
});
}
},
importfxx(obj) {
let _this = this;
// DOM
this.file = obj;
var rABS = false; //
var f = this.file;
var reader = new FileReader();
FileReader.prototype.readAsBinaryString = function (f) {
var binary = "";
var rABS = false; //
var pt = this;
var wb; //
var outdata;
var reader = new FileReader();
reader.onload = function (e) {
var bytes = new Uint8Array(reader.result);
// console.log(reader.result);
var length = bytes.byteLength;
for (var i = 0; i < length; i++) {
binary += String.fromCharCode(bytes[i]);
}
var XLSX = require("xlsx");
if (rABS) {
wb = XLSX.read(btoa(fixdata(binary)), {
//
type: "base64",
});
} else {
wb = XLSX.read(binary, {
type: "binary",
//
cellDates: true,
});
}
outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdataexcel西
this.da = [...outdata];
let arr = [];
let successNo = 0;
this.da.map((v) => {
console.log(7777, v);
let obj = {};
obj.sectionName = v["标段名称(必填)"]; //ip
obj.projectName = v["相关项目名称(必填)"]; //ip
obj.projectLegalPerson = v["项目法人单位"]; //ip
// obj.nativePlace = v[""]; //ip
obj.engineeringGrade = v["工程等别"]; //ip
obj.engineeringPurposes = v["工程用途"]; //ip
obj.constructionAddress = v["建设地址"]; //ip
obj.adcd = v["行政区划"]; //ip
obj.commencementDate = _this.parseTime(
v["开工日期"],
"{y}-{m}-{d}"
); //ip
obj.plannedCompletionDate = _this.parseTime(
v["计划竣工日期"],
"{y}-{m}-{d}"
); //ip
obj.isKeyProject = v["是否为安全度汛重点工程"]; //ip
obj.isPierceProject = v["是否穿破堤坝施工"]; //ip
if (obj.sectionName && obj.projectName) {
successNo += 1;
arr.push(obj);
}
});
if (this.da.length > 0) {
_this.$message({
type: "success",
message:
"一共" +
this.da.length +
"条数据,成功导入" +
successNo +
"条数据",
});
}
//return arr
// exceltableData()
_this.uploadParams.tableData =
_this.uploadParams.tableData.concat(arr);
console.log(
"_this.uploadParams.tableData",
_this.uploadParams.tableData
);
};
reader.readAsArrayBuffer(f);
};
if (rABS) {
reader.readAsArrayBuffer(f);
} else {
reader.readAsBinaryString(f);
}
},
//
handleFileUploadProgress(event, file, fileList) {
this.uploadParams.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.uploadParams.isUploading = false;
if (this.uploadParams.tableData.length) {
this.uploadParams.addAllOpen = false;
// this.$alert(response.msg, "", { dangerouslyUseHTMLString: true });
this.getList();
} else {
this.$message({
type: "warning",
message: "暂无有效数据",
});
}
},
submitTemplate() {
this.$refs.uploadTemplate.submit();
},
cancelTemplate() {
this.uploadParams.addAllOpen = false;
},
closeTemplate() {
this.uploadParams.tableData = [];
this.$refs.uploadTemplate.clearFiles();
},
openAddAll() {
this.uploadParams.addAllOpen = true;
},
importTemplate() {
tagTemplate().then((res) => {
console.log("下载模版", res);
this.downloadFile(res, true, res.msg);
});
},
getMapData(potMsg, lineMsg, allDrawMsg) {
this.potMsg = potMsg;
this.lineMsg = lineMsg;
@ -1996,6 +2260,11 @@ export default {
transform: scale(1);
}
}
.templateDialog {
/deep/ .el-dialog {
margin-top: 15vh !important;
}
}
.listTitle {
font-size: 14px;
padding-left: 10px;

4
jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/warning/options/preparationForConstruction.vue

@ -56,7 +56,7 @@
</el-descriptions-item>
</el-descriptions>
<div class="listTitle">
<!-- <div class="listTitle">
<span>施工组织设计</span>
</div>
<el-descriptions
@ -228,7 +228,7 @@
<template slot="label"> 批复意见 </template>
{{ this.preMsg.approvalOpinion5 }}
</el-descriptions-item>
</el-descriptions>
</el-descriptions> -->
<el-dialog
:title="title"

Loading…
Cancel
Save