|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -74,7 +74,7 @@
|
|
|
<el-table-column label="销售组织" align="center" prop="salesOrgName" v-if="source == 'Behavior'"/>
|
|
|
<el-table-column label="部门" align="center" prop="deptName" v-if="source == 'Behavior'"/>
|
|
|
|
|
|
- <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -233,76 +233,7 @@
|
|
|
<el-divider content-position="left">
|
|
|
<dev style="width: 50px; height: 40px; font-size: 18px">照片信息</dev>
|
|
|
</el-divider>
|
|
|
- <AA :value = "fileList"/>
|
|
|
- <!-- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- plain
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="small"
|
|
|
- @click="handleImport(`P`)"
|
|
|
- >上传</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-image
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- :src="url"
|
|
|
- :preview-src-list="srcList">
|
|
|
- </el-image> -->
|
|
|
- <!-- <el-divider content-position="left">附件</el-divider>
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- plain
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleImport(`A`)"
|
|
|
- >上传</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-table v-loading="loading" :data="form.accessory">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="序号"
|
|
|
- width="55"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column label="名称" align="center" prop="fileName" />
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-row>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="deleteBehaviorA('list', scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="exportAccessory(scope.row.url, scope.row.Name)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
+ <AA :limit="2" v-model="fileList"></AA>
|
|
|
<div class="md-auditInfo">
|
|
|
<el-divider content-position="left">
|
|
|
<dev style="width: 50px; height: 40px; font-size: 18px">其它信息</dev>
|
|
@@ -338,33 +269,6 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 上传对话框 -->
|
|
|
- <el-dialog
|
|
|
- :title="upload.title"
|
|
|
- :visible.sync="upload.open"
|
|
|
- width="400px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- ref="upload"
|
|
|
- :limit="1"
|
|
|
- accept=".xlsx, .xls,.doc,docx"
|
|
|
- :headers="upload.headers"
|
|
|
- :action="1"
|
|
|
- :disabled="upload.isUploading"
|
|
|
- :on-progress="handleFileUploadProgress"
|
|
|
- :on-success="handleFileSuccess"
|
|
|
- :auto-upload="false"
|
|
|
- drag
|
|
|
- >
|
|
|
- <i class="el-icon-upload"></i>
|
|
|
- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
- </el-upload>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
- <el-button @click="upload.open = false">取 消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
<!-- 联系人参照 -->
|
|
|
<ContactRef
|
|
|
ref="contactSelect"
|
|
@@ -383,11 +287,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { listBehavior, getBehavior, delBehavior, addBehavior, updateBehavior } from "@/api/business/spd/bo/behavior";
|
|
|
-import {delBehaviorA} from "@/api/business/spd/bo/behaviorA";
|
|
|
import ContactRef from '@/views/business/spd/bo/refer/contact/index.vue';
|
|
|
import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
|
|
|
-import axios from "axios";
|
|
|
-import { getToken } from "@/utils/auth";
|
|
|
import AA from '@/views/business/spd/bo/behavior/AA.vue';
|
|
|
|
|
|
export default {
|
|
@@ -397,8 +298,7 @@ export default {
|
|
|
components: {ContactRef,SaleaeaRef,AA},
|
|
|
data() {
|
|
|
return {
|
|
|
- fileList: [
|
|
|
- ],
|
|
|
+ fileList: [],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -462,28 +362,6 @@ export default {
|
|
|
{ required: true, message: "拜访效果不能为空", trigger: "blur" }
|
|
|
],
|
|
|
},
|
|
|
- // 上传参数
|
|
|
- upload: {
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- // 弹出层标题
|
|
|
- title: "",
|
|
|
- // 是否禁用上传
|
|
|
- isUploading: false,
|
|
|
- // 上传类型
|
|
|
- type: "",
|
|
|
- // 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
- // 上传的地址
|
|
|
- url: process.env.VUE_APP_BASE_API + "/mk/bo/behaviorA",
|
|
|
- },
|
|
|
- url: [
|
|
|
- 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
|
|
|
- ],
|
|
|
- srcList: [
|
|
|
- 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
|
|
|
- 'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
|
|
|
- ],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -500,6 +378,12 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ console.log(this.form.photos.split(','));
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 查询行动列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -607,6 +491,7 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "修改行动";
|
|
|
});
|
|
|
+ this.getPictureList();
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
@@ -638,88 +523,6 @@ export default {
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download('system/behavior/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `behavior_${new Date().getTime()}.xlsx`)
|
|
|
- },
|
|
|
- /** 上传按钮操作 */
|
|
|
- handleImport(type) {
|
|
|
- this.upload.open = true;
|
|
|
- this.upload.type = type;
|
|
|
- console.log('this.upload',this.upload);
|
|
|
- },
|
|
|
- // 提交上传文件
|
|
|
- submitFileForm() {
|
|
|
- this.$refs.upload.submit();
|
|
|
- },
|
|
|
- // 文件上传中处理
|
|
|
- handleFileUploadProgress(event, file, fileList) {
|
|
|
- this.upload.isUploading = true;
|
|
|
- },
|
|
|
- // 文件上传成功处理
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
- this.upload.open = false;
|
|
|
- this.upload.isUploading = false;
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
- this.$alert(
|
|
|
- "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
- response.msg +
|
|
|
- "</div>",
|
|
|
- "上传结果",
|
|
|
- { dangerouslyUseHTMLString: true }
|
|
|
- );
|
|
|
- },
|
|
|
- //下载附件
|
|
|
- exportBehaviorA(urlId, fileName) {
|
|
|
- let resUrl =
|
|
|
- "https://test-sy.derom.com/document-center/fastdfs/download?id=" +
|
|
|
- urlId;
|
|
|
- axios
|
|
|
- .create({
|
|
|
- timeout: 3000,
|
|
|
- responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
|
|
|
- headers: {},
|
|
|
- })
|
|
|
- .get(resUrl)
|
|
|
- .then((res) => {
|
|
|
- console.log(res);
|
|
|
- // 地址转换
|
|
|
- let url = window.URL.createObjectURL(res.data);
|
|
|
- const a = document.createElement("a");
|
|
|
- a.setAttribute("href", url);
|
|
|
- a.setAttribute("download", fileName);
|
|
|
- document.body.append(a);
|
|
|
- a.click();
|
|
|
- document.body.removeChild(a);
|
|
|
- });
|
|
|
- },
|
|
|
- //删除附件
|
|
|
- deleteBehaviorA(row) {
|
|
|
- this.$modal
|
|
|
- .confirm("是否确认删除?")
|
|
|
- .then(function () {})
|
|
|
- .then(() => {
|
|
|
- delBehaviorA(row.id).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- if (this.upload.flag == "list") {
|
|
|
- listAccessory(this.form.basic.id).then((response) => {
|
|
|
- this.form.accessory = response.rows;
|
|
|
- });
|
|
|
- } else {
|
|
|
- getBasic(this.$route.params.id).then((response) => {
|
|
|
- this.form.basic = response.data;
|
|
|
- });
|
|
|
- }
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- } else {
|
|
|
- this.$modal.msgSuccess("删除失败");
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
// 触发联系人参照列表
|
|
|
refereContact() {
|
|
|
this.$refs.contactSelect.init()
|