|
@@ -57,16 +57,33 @@
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="附件上传" prop="file">
|
|
<el-form-item label="附件上传" prop="file">
|
|
- <myUpload
|
|
|
|
|
|
+ <!-- <myUpload
|
|
v-if="title === '新建' || title === '发起人处理'"
|
|
v-if="title === '新建' || title === '发起人处理'"
|
|
@uploadBack="uploadBack"
|
|
@uploadBack="uploadBack"
|
|
:fileInfo="fileInfo"
|
|
:fileInfo="fileInfo"
|
|
:fileList="fileInfo.fileList"
|
|
:fileList="fileInfo.fileList"
|
|
- ></myUpload>
|
|
|
|
|
|
+ ></myUpload> -->
|
|
|
|
+ <el-upload
|
|
|
|
+ v-if="title === '新建' || title === '发起人处理'"
|
|
|
|
+ class="upload-demo"
|
|
|
|
+ drag
|
|
|
|
+ :limit="3"
|
|
|
|
+ :on-exceed="uploadExceed"
|
|
|
|
+ :on-remove="uploadRemove"
|
|
|
|
+ :http-request="uploadBack"
|
|
|
|
+ action="http://192.168.1.228:9600/spfm"
|
|
|
|
+ multiple
|
|
|
|
+ :file-list="file"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
|
+ <div class="el-upload__text">
|
|
|
|
+ 将文件拖到此处,或<em>点击上传</em>
|
|
|
|
+ </div>
|
|
|
|
+ </el-upload>
|
|
<div v-else>
|
|
<div v-else>
|
|
- <div v-if="fileInfo.fileList.length === 0">暂无附件</div>
|
|
|
|
|
|
+ <div v-if="file.length === 0">暂无附件</div>
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in fileInfo.fileList"
|
|
|
|
|
|
+ v-for="(item, index) in file"
|
|
:key="index"
|
|
:key="index"
|
|
class="simple-table-click cursor-pointer margin-left-10"
|
|
class="simple-table-click cursor-pointer margin-left-10"
|
|
@click="handleDownload(item)"
|
|
@click="handleDownload(item)"
|
|
@@ -148,7 +165,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import myUpload from "../../../components/upload";
|
|
|
|
|
|
+// import myUpload from "../../../components/upload";
|
|
import simpleForm from "../performance/components/form.vue";
|
|
import simpleForm from "../performance/components/form.vue";
|
|
import simpleTable from "../performance/components/table.vue";
|
|
import simpleTable from "../performance/components/table.vue";
|
|
import simpleDialog from "../performance/components/dialog.vue";
|
|
import simpleDialog from "../performance/components/dialog.vue";
|
|
@@ -158,7 +175,7 @@ export default {
|
|
components: {
|
|
components: {
|
|
simpleForm,
|
|
simpleForm,
|
|
simpleDialog,
|
|
simpleDialog,
|
|
- myUpload,
|
|
|
|
|
|
+ // myUpload,
|
|
simpleTable,
|
|
simpleTable,
|
|
simplePagination,
|
|
simplePagination,
|
|
},
|
|
},
|
|
@@ -206,6 +223,14 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
|
|
+ file: [],
|
|
|
|
+ file1: "",
|
|
|
|
+ file2: "",
|
|
|
|
+ file3: "",
|
|
|
|
+ // 删除的文件
|
|
|
|
+ delFile: "",
|
|
|
|
+ // 暂存删除文件
|
|
|
|
+ tmpDeleteFile: [],
|
|
// 当前用户标识
|
|
// 当前用户标识
|
|
loginNoStr: "",
|
|
loginNoStr: "",
|
|
fileInfo: {
|
|
fileInfo: {
|
|
@@ -324,23 +349,23 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "流程环节",
|
|
label: "流程环节",
|
|
- props: "taskName",
|
|
|
|
|
|
+ props: "liuchengName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "处理人",
|
|
label: "处理人",
|
|
- props: "opName",
|
|
|
|
|
|
+ props: "createId",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "处理工号",
|
|
label: "处理工号",
|
|
- props: "opNo",
|
|
|
|
|
|
+ props: "createName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "处理时间",
|
|
label: "处理时间",
|
|
- props: "opTime",
|
|
|
|
|
|
+ props: "createTime",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "审批意见",
|
|
label: "审批意见",
|
|
- props: "remark",
|
|
|
|
|
|
+ props: "desc",
|
|
// type: "dictionary",
|
|
// type: "dictionary",
|
|
// dictionary: { 0: "同意", 1: "不同意" },
|
|
// dictionary: { 0: "同意", 1: "不同意" },
|
|
},
|
|
},
|
|
@@ -375,15 +400,18 @@ export default {
|
|
this.table_list = data
|
|
this.table_list = data
|
|
? data.map((element, index) => ({
|
|
? data.map((element, index) => ({
|
|
...element,
|
|
...element,
|
|
|
|
+ id: element.id + "",
|
|
deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
|
|
deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
|
|
isEdit:
|
|
isEdit:
|
|
- element.draft === "0" && element.createId === this.loginNoStr
|
|
|
|
|
|
+ element.draft === "0" &&
|
|
|
|
+ element.createId === this.loginNoStr &&
|
|
|
|
+ element.parentLevel === "0"
|
|
? "1"
|
|
? "1"
|
|
: "0",
|
|
: "0",
|
|
No: index + 1,
|
|
No: index + 1,
|
|
}))
|
|
}))
|
|
: [];
|
|
: [];
|
|
- console.log(this.table_list);
|
|
|
|
|
|
+ // console.log(this.table_list);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 搜索事件
|
|
// 搜索事件
|
|
@@ -402,7 +430,7 @@ export default {
|
|
this.title = "新建";
|
|
this.title = "新建";
|
|
this.isCheck = false;
|
|
this.isCheck = false;
|
|
this.add_form = {};
|
|
this.add_form = {};
|
|
- this.fileInfo.fileList = [];
|
|
|
|
|
|
+ this.file = [];
|
|
break;
|
|
break;
|
|
case "summary":
|
|
case "summary":
|
|
this.summary_visible = !this.summary_visible;
|
|
this.summary_visible = !this.summary_visible;
|
|
@@ -431,26 +459,51 @@ export default {
|
|
},
|
|
},
|
|
handleSelect(val) {
|
|
handleSelect(val) {
|
|
this.summaryIds = val.map((item) => {
|
|
this.summaryIds = val.map((item) => {
|
|
- return item.id.toString();
|
|
|
|
|
|
+ return item.wanggeId + "";
|
|
});
|
|
});
|
|
// console.log(this.summaryIds);
|
|
// console.log(this.summaryIds);
|
|
},
|
|
},
|
|
//文件返回值
|
|
//文件返回值
|
|
- uploadBack(v) {
|
|
|
|
- const fileName = [];
|
|
|
|
- const fileIds = [];
|
|
|
|
- v.forEach((element) => {
|
|
|
|
- fileName.push(element.fileName);
|
|
|
|
- fileIds.push(element.fileCode);
|
|
|
|
|
|
+ uploadBack({ file }) {
|
|
|
|
+ console.log({}.constructor.name, "obj");
|
|
|
|
+ console.log(file.constructor.name, "file");
|
|
|
|
+ // console.log( file instanceof Object,'sasdas');
|
|
|
|
+ this.file.push(file);
|
|
|
|
+ console.log(this.file);
|
|
|
|
+ this.file1 = this.file[0];
|
|
|
|
+ this.file2 = this.file[1];
|
|
|
|
+ this.file3 = this.file[2];
|
|
|
|
+ },
|
|
|
|
+ // 删除文件
|
|
|
|
+ uploadRemove(file) {
|
|
|
|
+ // console.log(file);
|
|
|
|
+ this.file.forEach((item, index) => {
|
|
|
|
+ console.log(item, "rsr");
|
|
|
|
+ if (item.uid === file.uid) {
|
|
|
|
+ this.file.splice(index, 1);
|
|
|
|
+ if (item.id) {
|
|
|
|
+ this.tmpDeleteFile.push(item.id);
|
|
|
|
+ // this.delFile = this.delFile + item.id + ','
|
|
|
|
+ this.delFile = this.tmpDeleteFile.join(",");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ console.log(this.file, this.delFile);
|
|
|
|
+ this.file1 = this.file[0];
|
|
|
|
+ this.file2 = this.file[1];
|
|
|
|
+ this.file3 = this.file[2];
|
|
|
|
+ },
|
|
|
|
+ // 超出文件上传限制
|
|
|
|
+ uploadExceed(file) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "附件最多可上传3个!",
|
|
|
|
+ type: "error",
|
|
});
|
|
});
|
|
- console.log(v);
|
|
|
|
- this.add_form.fileNames = fileName.join(",");
|
|
|
|
- this.add_form.fileIds = fileIds.join(",");
|
|
|
|
- // console.log(this.add_form,'this.add_form')
|
|
|
|
|
|
+ console.log(file);
|
|
},
|
|
},
|
|
// 获取模态框信息
|
|
// 获取模态框信息
|
|
getDialogData(row) {
|
|
getDialogData(row) {
|
|
- let id = row.id;
|
|
|
|
|
|
+ let id = row.wanggeId;
|
|
let type = row.parentId === null ? "1" : "0";
|
|
let type = row.parentId === null ? "1" : "0";
|
|
this.$http({
|
|
this.$http({
|
|
url: "/market/mkWangge/getMkWanggeById",
|
|
url: "/market/mkWangge/getMkWanggeById",
|
|
@@ -464,26 +517,25 @@ export default {
|
|
},
|
|
},
|
|
}).then(({ data: { body } }) => {
|
|
}).then(({ data: { body } }) => {
|
|
console.log(body, "body");
|
|
console.log(body, "body");
|
|
- this.ids = [body.id.toString()];
|
|
|
|
|
|
+ this.ids = [body.wanggeId.toString()];
|
|
this.add_form = {
|
|
this.add_form = {
|
|
- id: body.id,
|
|
|
|
|
|
+ id: body.wanggeId,
|
|
proposer: body.proposer,
|
|
proposer: body.proposer,
|
|
telephone: body.telephone,
|
|
telephone: body.telephone,
|
|
wanggeText: body.wanggeText,
|
|
wanggeText: body.wanggeText,
|
|
fileNames: body.fileNames,
|
|
fileNames: body.fileNames,
|
|
fileIds: body.fileIds,
|
|
fileIds: body.fileIds,
|
|
};
|
|
};
|
|
- this.table_list_approve = body.bpmTaskList
|
|
|
|
- ? body.bpmTaskList.map((item, index) => ({
|
|
|
|
|
|
+ this.table_list_approve = body.mkWanggeLogList
|
|
|
|
+ ? body.mkWanggeLogList.map((item, index) => ({
|
|
...item,
|
|
...item,
|
|
No: index + 1,
|
|
No: index + 1,
|
|
}))
|
|
}))
|
|
: [];
|
|
: [];
|
|
- this.fileInfo.fileList = body.fileNames
|
|
|
|
- ? body.fileNames.split(",").map((el, index) => ({
|
|
|
|
- fileName: el,
|
|
|
|
- name: el,
|
|
|
|
- fileCode: body.fileIds.split(",")[index],
|
|
|
|
|
|
+ this.file = body.attList
|
|
|
|
+ ? body.attList.map((item) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ name: item.fileName,
|
|
}))
|
|
}))
|
|
: [];
|
|
: [];
|
|
});
|
|
});
|
|
@@ -494,7 +546,7 @@ export default {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/approvalExamination",
|
|
path: "/approvalExamination",
|
|
query: {
|
|
query: {
|
|
- parentId: row.id.toString(),
|
|
|
|
|
|
+ parentId: row.wanggeId.toString(),
|
|
status: row.sts.toString(),
|
|
status: row.sts.toString(),
|
|
},
|
|
},
|
|
});
|
|
});
|
|
@@ -514,7 +566,7 @@ export default {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/approvalExamination",
|
|
path: "/approvalExamination",
|
|
query: {
|
|
query: {
|
|
- parentId: row.id.toString(),
|
|
|
|
|
|
+ parentId: row.wanggeId.toString(),
|
|
status: row.sts.toString(),
|
|
status: row.sts.toString(),
|
|
},
|
|
},
|
|
});
|
|
});
|
|
@@ -540,26 +592,43 @@ export default {
|
|
}
|
|
}
|
|
this.$refs.add_ref.validate((valid) => {
|
|
this.$refs.add_ref.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- let reqdata = [
|
|
|
|
- {
|
|
|
|
- ...this.add_form,
|
|
|
|
- procId: "729294602773110788",
|
|
|
|
- draft: draft,
|
|
|
|
- num: "1",
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+ let formData = new FormData();
|
|
|
|
+ // console.log(this.file1,'adasdsa')
|
|
|
|
+ let reqdata = {
|
|
|
|
+ ...this.add_form,
|
|
|
|
+ procId: "729294602773110788",
|
|
|
|
+ draft: draft,
|
|
|
|
+ num: "1",
|
|
|
|
+ delFileId: this.delFile ? this.delFile : "",
|
|
|
|
+ };
|
|
|
|
+ // 这是处理文件的参数
|
|
|
|
+ this.file.forEach((el, index) => {
|
|
|
|
+ if (el.constructor.name === "File") {
|
|
|
|
+ formData.append(`file${index + 1}`, el);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // 表单的其他参数
|
|
|
|
+ for (let key in reqdata) {
|
|
|
|
+ formData.append(key, reqdata[key]);
|
|
|
|
+ }
|
|
|
|
+ // this.file1 ? formData.append("file1", this.file1) : "";
|
|
|
|
+ // this.file2 ? formData.append("file2", this.file2) : "";
|
|
|
|
+ // this.file3 ? formData.append("file3", this.file3) : "";
|
|
|
|
+ // this.file ? formData.append("file", this.file) : [] ;
|
|
|
|
+ // ;
|
|
if (!this.approve_visible) {
|
|
if (!this.approve_visible) {
|
|
// 编辑/新增
|
|
// 编辑/新增
|
|
this.$http({
|
|
this.$http({
|
|
url: "/market/mkWangge/saveOrUpdateList",
|
|
url: "/market/mkWangge/saveOrUpdateList",
|
|
method: "post",
|
|
method: "post",
|
|
headers: {
|
|
headers: {
|
|
- "Content-Type": "application/json",
|
|
|
|
|
|
+ "Content-Type": "multipart/form-data",
|
|
},
|
|
},
|
|
- data: reqdata,
|
|
|
|
|
|
+ data: formData,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.handleInit();
|
|
this.handleInit();
|
|
|
|
+ this.handleVisible("add");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
// 审批
|
|
// 审批
|
|
@@ -581,11 +650,12 @@ export default {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.handleInit();
|
|
this.handleInit();
|
|
|
|
+ this.handleVisible("add");
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- this.edit_visible = false;
|
|
|
|
- this.add_visible = false;
|
|
|
|
- this.fileInfo.fileList = [];
|
|
|
|
|
|
+ // this.edit_visible = false;
|
|
|
|
+ // this.add_visible = false;
|
|
|
|
+ this.file = [];
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -636,10 +706,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 附件下载
|
|
// 附件下载
|
|
- handleDownload({fileCode,fileName}) {
|
|
|
|
- console.log(fileCode,fileName);
|
|
|
|
|
|
+ handleDownload({ fileCode, fileName }) {
|
|
|
|
+ console.log(fileCode, fileName);
|
|
this.$http({
|
|
this.$http({
|
|
- url: "/market/compatt/downfile",
|
|
|
|
|
|
+ url: "/bpm/api/download",
|
|
method: "post",
|
|
method: "post",
|
|
headers: {
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
"Content-Type": "application/json",
|