|
@@ -10,15 +10,18 @@
|
|
|
label-width="85px"
|
|
|
>
|
|
|
<el-row>
|
|
|
- <el-col :span="5">
|
|
|
- <el-form-item label="申报时间">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="申报日期">
|
|
|
<el-date-picker
|
|
|
v-model="filterForm.data.declaretime"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
format="yyyy-MM-dd"
|
|
|
:formatter="declaretime"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ size="mini"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -45,7 +48,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item label="设备名称">
|
|
|
+ <el-form-item label="报工状态">
|
|
|
<el-select
|
|
|
filterable
|
|
|
clearable
|
|
@@ -220,8 +223,8 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
sortable
|
|
|
- prop="filename"
|
|
|
- label="附件"
|
|
|
+ prop="bz"
|
|
|
+ label="备注"
|
|
|
width="240px"
|
|
|
:show-overflow-tooltip="true"
|
|
|
>
|
|
@@ -356,19 +359,11 @@
|
|
|
min-width="100px"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- sortable
|
|
|
- prop="filename"
|
|
|
- label="附件"
|
|
|
- width="240px"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
class-name="gn-TableDownloadExcel-none"
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
- width="140px"
|
|
|
+ width="180px"
|
|
|
fixed="right"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
@@ -380,6 +375,13 @@
|
|
|
@click="but_editab(scope.row)"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="downloadFiles(scope.row)"
|
|
|
+ :loading="loading"
|
|
|
+ >下载附件
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -416,6 +418,7 @@
|
|
|
min-width="100px"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
sortable
|
|
|
prop="signtime"
|
|
@@ -451,19 +454,11 @@
|
|
|
min-width="100px"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- sortable
|
|
|
- prop="construfile"
|
|
|
- label="附件"
|
|
|
- width="240px"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
class-name="gn-TableDownloadExcel-none"
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
- width="140px"
|
|
|
+ width="240px"
|
|
|
fixed="right"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
@@ -480,6 +475,13 @@
|
|
|
@click="but_delect(scope.row)"
|
|
|
>撤销</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="downloadFile(scope.row)"
|
|
|
+ :loading="loading"
|
|
|
+ >下载附件
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -516,8 +518,25 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="报工状态" prop="state">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model="dialog.editorBox.form.dataa.state"
|
|
|
+ placeholder="设备名称"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item of nameObj.state.arr"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.name"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="施工方" prop="constructionunits">
|
|
@@ -543,15 +562,18 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="施工人数" prop="construpeople">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
clearable
|
|
|
v-model="dialog.editorBox.form.data.construpeople"
|
|
|
+ οninput="value=value.replace(/[^0-9]/g,'')"
|
|
|
+ maxlength="9"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="报工时间">
|
|
|
+ <el-form-item label="报工日期">
|
|
|
<el-date-picker
|
|
|
v-model="filterForm.dataa.signtime"
|
|
|
type="date"
|
|
@@ -580,13 +602,21 @@
|
|
|
</el-form-item>
|
|
|
</el-main>
|
|
|
<el-aside width="200px" style="padding-left: 15px">
|
|
|
- <zj-fileUploadBox
|
|
|
- class="fileUploadBox"
|
|
|
- :files="dialog.editorBox.files"
|
|
|
- ></zj-fileUploadBox>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action=""
|
|
|
+ :on-change="fileRemoveHandle4"
|
|
|
+ multiple
|
|
|
+ :limit="5"
|
|
|
+ :file-list="fileList"
|
|
|
+ :http-request="beforeUpload"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
</el-aside>
|
|
|
</el-container>
|
|
|
- <el-form-item label="现场图片">
|
|
|
+ <!-- <el-form-item label="现场图片">
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
action=""
|
|
@@ -601,7 +631,7 @@
|
|
|
>
|
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</el-form>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -610,6 +640,131 @@
|
|
|
<el-button type="primary" @click="reject()">取消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :title="'文件下载列表'"
|
|
|
+ :visible.sync="dialog.editorBox.showtype"
|
|
|
+ width="610px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :show-close="!loading"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-form
|
|
|
+ size="mini"
|
|
|
+ ref="dialog_form_arr"
|
|
|
+ label-width="0px"
|
|
|
+ :model="tableFormDataObj"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ stripe
|
|
|
+ id="singleTable"
|
|
|
+ ref="singleTable"
|
|
|
+ :data="tableDatavalue"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ style="width: 100%"
|
|
|
+ :height="singleTableHeight"
|
|
|
+ border
|
|
|
+ size="mini"
|
|
|
+ highlight-current-row
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ fixed
|
|
|
+ prop="fileName"
|
|
|
+ label="文件名称"
|
|
|
+ width="160px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ fixed
|
|
|
+ prop="filePath"
|
|
|
+ label="文件路径"
|
|
|
+ width="340px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="操作" width="200px" fixed="right"
|
|
|
+ ><template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="downloadFilevalue(scope.row)"
|
|
|
+ :loading="loading"
|
|
|
+ >点击下载
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="delFilevalue(scope.row)"
|
|
|
+ :loading="loading"
|
|
|
+ >点击删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :title="'审批文件下载列表'"
|
|
|
+ :visible.sync="dialog.editorBox.showtypea"
|
|
|
+ width="610px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :show-close="!loading"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-form
|
|
|
+ size="mini"
|
|
|
+ ref="dialog_form_arr"
|
|
|
+ label-width="0px"
|
|
|
+ :model="tableFormDataObj"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ stripe
|
|
|
+ id="singleTable"
|
|
|
+ ref="singleTable"
|
|
|
+ :data="tableDatavalue"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ style="width: 100%"
|
|
|
+ :height="singleTableHeight"
|
|
|
+ border
|
|
|
+ size="mini"
|
|
|
+ highlight-current-row
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ fixed
|
|
|
+ prop="fileName"
|
|
|
+ label="文件名称"
|
|
|
+ width="160px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ fixed
|
|
|
+ prop="filePath"
|
|
|
+ label="文件路径"
|
|
|
+ width="340px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="操作" width="200px" fixed="right"
|
|
|
+ ><template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="downloadFilevalue(scope.row)"
|
|
|
+ :loading="loading"
|
|
|
+ >点击下载
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog
|
|
|
:title="'检修停复役申请单 - 报工明细'"
|
|
|
:visible.sync="newdialog.editorBox.show"
|
|
@@ -630,7 +785,7 @@
|
|
|
<el-form-item label="报工序号" prop="construid">
|
|
|
<el-input
|
|
|
clearable
|
|
|
- v-model="dialog.editorBox.form.data.construid"
|
|
|
+ v-model="dialog.editorBox.form.dataa.construid"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
disabled
|
|
@@ -662,7 +817,7 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="报工时间" prop="signtime">
|
|
|
+ <el-form-item label="报工日期" prop="signtime">
|
|
|
<el-input
|
|
|
clearable
|
|
|
v-model="dialog.editorBox.form.data.signtime"
|
|
@@ -722,22 +877,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-main>
|
|
|
- <el-aside width="200px" style="padding-left: 15px">
|
|
|
- <zj-fileUploadBox
|
|
|
- class="fileUploadBox"
|
|
|
- :files="dialog.editorBox.files"
|
|
|
- ></zj-fileUploadBox>
|
|
|
- </el-aside>
|
|
|
</el-container>
|
|
|
- <el-form-item label="现场图片" prop="">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- type="textarea"
|
|
|
- disabled
|
|
|
- placeholder=""
|
|
|
- style="width: 100%"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -780,10 +920,23 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
format="yyyy-MM-dd"
|
|
|
:formatter="declaretime"
|
|
|
+ style="width: 100%"
|
|
|
+ disabled
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="申请负责人" prop="chargeman">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="dialog.editorBox.form.data.chargeman"
|
|
|
+ placeholder=""
|
|
|
+ style="width: 100%"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
@@ -804,6 +957,7 @@
|
|
|
v-model="dialog.editorBox.form.data.equipmentname"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item of nameObj.equipmentname.arr"
|
|
@@ -815,17 +969,6 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="申请负责人" prop="chargeman">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="dialog.editorBox.form.data.chargeman"
|
|
|
- placeholder=""
|
|
|
- style="width: 100%"
|
|
|
- disabled
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
@@ -836,6 +979,7 @@
|
|
|
v-model="dialog.editorBox.form.data.devicename"
|
|
|
placeholder="设备名称"
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item of nameObj.devicename.arr"
|
|
@@ -854,6 +998,7 @@
|
|
|
v-model="dialog.editorBox.form.data.equipment"
|
|
|
placeholder="设备名称"
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item of nameObj.equipment.arr"
|
|
@@ -873,6 +1018,7 @@
|
|
|
v-model="dialog.editorBox.form.data.constructionunits"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -883,6 +1029,7 @@
|
|
|
v-model="dialog.editorBox.form.data.construpeople"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -897,15 +1044,10 @@
|
|
|
v-model="dialog.editorBox.form.data.reasoncontent"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-main>
|
|
|
- <el-aside width="200px" style="padding-left: 15px">
|
|
|
- <zj-fileUploadBox
|
|
|
- class="fileUploadBox"
|
|
|
- :files="dialog.editorBox.files"
|
|
|
- ></zj-fileUploadBox>
|
|
|
- </el-aside>
|
|
|
</el-container>
|
|
|
<el-form-item label="备注" prop="bz">
|
|
|
<el-input
|
|
@@ -914,6 +1056,7 @@
|
|
|
v-model="dialog.editorBox.form.data.bz"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
+ disabled
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -938,9 +1081,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ tableDatavalue: [],
|
|
|
+ fileList: [],
|
|
|
dialogImagename: "",
|
|
|
dialogVisible: false,
|
|
|
- fileList: "",
|
|
|
declaretime: "",
|
|
|
leixin: "add",
|
|
|
multipleSelection: [],
|
|
@@ -1047,12 +1191,12 @@ export default {
|
|
|
name: "已通过",
|
|
|
},
|
|
|
{
|
|
|
- id: "start",
|
|
|
- name: "已驳回",
|
|
|
+ id: "starta",
|
|
|
+ name: "已完成",
|
|
|
},
|
|
|
{
|
|
|
- id: "check",
|
|
|
- name: "审核中",
|
|
|
+ id: "startb",
|
|
|
+ name: "进行中",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -1072,6 +1216,22 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ state: {
|
|
|
+ obj: {
|
|
|
+ value1: "已完成",
|
|
|
+ value2: "进行中",
|
|
|
+ },
|
|
|
+ arr: [
|
|
|
+ {
|
|
|
+ id: "value1",
|
|
|
+ name: "已完成",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "value2",
|
|
|
+ name: "进行中",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
},
|
|
|
loading: false,
|
|
|
tableLoading: false,
|
|
@@ -1089,6 +1249,8 @@ export default {
|
|
|
},
|
|
|
dialog: {
|
|
|
editorBox: {
|
|
|
+ showtypea: false,
|
|
|
+ showtype: false,
|
|
|
show: false,
|
|
|
type: "",
|
|
|
form: {
|
|
@@ -1104,6 +1266,7 @@ export default {
|
|
|
imagename: "", //图片名称
|
|
|
imageurl: "", //图片路径
|
|
|
bz: "", //报工人员
|
|
|
+ state: "", //报工状态
|
|
|
},
|
|
|
data: {
|
|
|
billstatus: "", //审核状态
|
|
@@ -1141,9 +1304,7 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
},
|
|
|
- files: [
|
|
|
-
|
|
|
- ],
|
|
|
+ files: [],
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -1178,6 +1339,159 @@ export default {
|
|
|
that.getselect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 附件删除
|
|
|
+ delFilevalue(row) {
|
|
|
+ let that = this;
|
|
|
+ let params = {
|
|
|
+ filePath: row.filePath,
|
|
|
+ fileName: row.fileName,
|
|
|
+ };
|
|
|
+ that
|
|
|
+ .$confirm("是否删除已选数据?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ state: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.axios
|
|
|
+ .delete("pass/ems/v1/tmaintenancefiles/delfile/", {
|
|
|
+ params: params,
|
|
|
+ })
|
|
|
+ .then(function (res) {
|
|
|
+ if (res.code === "0") {
|
|
|
+ that.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ that.dialog.editorBox.showtype = false;
|
|
|
+ } else {
|
|
|
+ if (res.code === "51") {
|
|
|
+ }
|
|
|
+ that.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function () {});
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //文件下载
|
|
|
+ downloadFilevalue(row) {
|
|
|
+ let that = this;
|
|
|
+ let SubmitData = {
|
|
|
+ fileName: row.fileName,
|
|
|
+ filePath: row.filePath,
|
|
|
+ };
|
|
|
+ that.loading = true;
|
|
|
+ let urla = "pass/ems/v1/tmaintenancefiles/downloadFile/";
|
|
|
+ that.axios
|
|
|
+ .get(urla, {
|
|
|
+ params: SubmitData,
|
|
|
+ responseType: "blob",
|
|
|
+ })
|
|
|
+ .then(function (res) {
|
|
|
+ console.log("fdgd");
|
|
|
+ that.saveAs(res, row.fileName);
|
|
|
+ that.$message({
|
|
|
+ message: "下载成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ that.loading = false;
|
|
|
+ })
|
|
|
+ .catch(function () {
|
|
|
+ that.$message.error("下载失败");
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saveAs(data, fileName) {
|
|
|
+ this.loading = true;
|
|
|
+ let urlObject = window.URL || window.webkitURL || window;
|
|
|
+ // 将二进制流转为blob
|
|
|
+ let exportBlob = new Blob([data]);
|
|
|
+ if (typeof window.navigator.msSaveBlob !== "undefined") {
|
|
|
+ // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
|
|
|
+ window.navigator.msSaveBlob(exportBlob, decodeURI(fileName));
|
|
|
+ this.loading = false;
|
|
|
+ } else {
|
|
|
+ // 创建新的URL并指向File对象或者Blob对象的地址
|
|
|
+ let blobURL = urlObject.createObjectURL(exportBlob);
|
|
|
+ let saveLink = document.createElement("a");
|
|
|
+ // 兼容:某些浏览器不支持HTML5的download属性
|
|
|
+ if (typeof saveLink.download === "undefined") {
|
|
|
+ saveLink.setAttribute("target", "_blank");
|
|
|
+ } else {
|
|
|
+ saveLink.download = fileName;
|
|
|
+ }
|
|
|
+ // 创建新的URL并指向File对象或者Blob对象的地址
|
|
|
+ saveLink.href = blobURL;
|
|
|
+ saveLink.click();
|
|
|
+ // 释放blob URL地址
|
|
|
+ urlObject.revokeObjectURL(exportBlob);
|
|
|
+ this.loading = false;
|
|
|
+ // let blob = new Blob([data])
|
|
|
+ // let fileURL = urlObject.createObjectURL(blob);
|
|
|
+ // 下载代码
|
|
|
+ // let downEle = document.createElement('a')
|
|
|
+ // let fname = `download` //下载文件的名字
|
|
|
+ // downEle.href = fileURL
|
|
|
+ // downEle.setAttribute('download', fname)
|
|
|
+ // document.body.appendChild(downEle)
|
|
|
+ // downEle.click()
|
|
|
+ // window.open(fileURL);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ downloadFiles(row) {
|
|
|
+ let that = this;
|
|
|
+ let id = row.declareid;
|
|
|
+ let url = "pass/ems/v1/tmaintenancefiles/getlist/";
|
|
|
+ that.axios.get(url + "?" + "id=" + id).then(function (res) {
|
|
|
+ if (res.code === "0") {
|
|
|
+ let arr = [];
|
|
|
+ for (let item of res.data) {
|
|
|
+ arr.push({
|
|
|
+ fileName: item.filename,
|
|
|
+ filePath: item.filepath,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ that.tableDatavalue = arr;
|
|
|
+ that.dialog.editorBox.showtypea = true;
|
|
|
+ that.tableLoading = false;
|
|
|
+ console.log("tableDatavalue" + tableDatavalue);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ downloadFile(row) {
|
|
|
+ let that = this;
|
|
|
+ let construid = row.construid;
|
|
|
+ let url = "pass/ems/v1/tmaintenancefiles/getlists/";
|
|
|
+ that.axios.get(url + "?" + "construid=" + construid).then(function (res) {
|
|
|
+ if (res.code === "0") {
|
|
|
+ let arr = [];
|
|
|
+ for (let item of res.data) {
|
|
|
+ arr.push({
|
|
|
+ fileName: item.filename,
|
|
|
+ filePath: item.filepath,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ that.tableDatavalue = arr;
|
|
|
+ that.dialog.editorBox.showtype = true;
|
|
|
+ that.tableLoading = false;
|
|
|
+ console.log("tableDatavalue" + tableDatavalue);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 使用说明文档 路径
|
|
|
+ fileRemoveHandle4(file, fileList) {
|
|
|
+ let that = this;
|
|
|
+ console.log("file,fileList" + file, fileList);
|
|
|
+ // if (file.id) {
|
|
|
+ // this.instFilePics.push(file.id);
|
|
|
+ // }
|
|
|
+ that.fileList = fileList;
|
|
|
+ },
|
|
|
//接收上传的图片
|
|
|
imagechange(file, fileList) {
|
|
|
let that = this;
|
|
@@ -1275,6 +1589,7 @@ export default {
|
|
|
constructionunits: item.constructionunits,
|
|
|
construpeople: item.construpeople,
|
|
|
construfile: item.construfile,
|
|
|
+ state :item.state
|
|
|
});
|
|
|
}
|
|
|
that.tableDataa = arr;
|
|
@@ -1289,16 +1604,17 @@ export default {
|
|
|
getselect(pageNum) {
|
|
|
let that = this;
|
|
|
let params = {
|
|
|
- declaretime: that.filterForm.data.declaretime,
|
|
|
+ declaretime: that.filterForm.data.declaretime[0],
|
|
|
+ declaretime1: that.filterForm.data.declaretime[1],
|
|
|
applayer: that.filterForm.data.applayer,
|
|
|
declareid: that.filterForm.data.declareid,
|
|
|
- billstatus: "已通过",
|
|
|
- record: !0,
|
|
|
+ billstatus: that.filterForm.data.billstatus,
|
|
|
+ record: 0,
|
|
|
};
|
|
|
that.pageNum = pageNum || that.pageNum;
|
|
|
that.tableLoading = true;
|
|
|
let url =
|
|
|
- "pass/ems/v1/tmaintenances/likeapproval/?pageNum=" +
|
|
|
+ "pass/ems/v1/tmaintenances/approval/?pageNum=" +
|
|
|
that.pageNum +
|
|
|
"&pageSize=" +
|
|
|
that.pageSize;
|
|
@@ -1337,7 +1653,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- datesave(){
|
|
|
+ datesave() {
|
|
|
this.newdialog.editorBox.show = false;
|
|
|
},
|
|
|
// 改变表格显示条数
|
|
@@ -1491,6 +1807,11 @@ export default {
|
|
|
bz: that.dialog.editorBox.form.dataa.bz,
|
|
|
devicename: that.dialog.editorBox.form.data.devicename,
|
|
|
imagename: that.dialogImagename,
|
|
|
+ state: that.dialog.editorBox.form.dataa.state,
|
|
|
+ };
|
|
|
+ let SubmitData1 = {
|
|
|
+ declareid: that.dialog.editorBox.form.data.declareid,
|
|
|
+ state: that.dialog.editorBox.form.dataa.state,
|
|
|
};
|
|
|
let message = "保存成功";
|
|
|
that.$refs["dialog_form"].validate((valid) => {
|
|
@@ -1504,20 +1825,14 @@ export default {
|
|
|
let del = "";
|
|
|
// 保存的文件名
|
|
|
let filename = "";
|
|
|
- for (let item of that.dialog.editorBox.files) {
|
|
|
- if (item.operation === "add" && item.file && item.name) {
|
|
|
- fileData.append("file", item.file);
|
|
|
- }
|
|
|
- if (item.operation === "del" && item.name) {
|
|
|
- del += item.name + ";";
|
|
|
- }
|
|
|
+ for (let item of that.fileList) {
|
|
|
+ fileData.append("file", item.raw);
|
|
|
if (item.operation !== "del" && item.name) {
|
|
|
filename += item.name + ";";
|
|
|
}
|
|
|
}
|
|
|
fileData.set("pageNum", that.pageNum);
|
|
|
fileData.set("construfile", filename);
|
|
|
- fileData.set("del", del);
|
|
|
that.axios
|
|
|
.post(url, fileData, {
|
|
|
headers: { "Content-Type": "multipart/form-data" },
|
|
@@ -1535,6 +1850,24 @@ export default {
|
|
|
that.getselect1();
|
|
|
that.loading = false;
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ this.axios
|
|
|
+ .post("pass/ems/v1/tmaintenances/upstate/", SubmitData1)
|
|
|
+ .then(function (res) {
|
|
|
+ if (res.code === "0") {
|
|
|
+ that.$message({
|
|
|
+ message: "",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ that.getselect();
|
|
|
+ } else {
|
|
|
+ if (res.code === "51") {
|
|
|
+ }
|
|
|
+ that.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function () {});
|
|
|
+ })
|
|
|
.catch(function () {
|
|
|
that.loading = false;
|
|
|
});
|