|
@@ -1,85 +1,37 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container v-if="!basic">
|
|
|
- <avue-crud
|
|
|
- :data="data"
|
|
|
- ref="crud"
|
|
|
- :option="option"
|
|
|
- :key="key"
|
|
|
- @resetColumn="resetColumn"
|
|
|
- @saveColumn="saveColumn"
|
|
|
- >
|
|
|
+ <avue-crud :data="data" ref="crud" :option="option" :key="key" @resetColumn="resetColumn"
|
|
|
+ @saveColumn="saveColumn">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="addDetail"
|
|
|
- :disabled="disabled"
|
|
|
- v-if="display"
|
|
|
- >上传
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-edit" @click="addDetail" :disabled="disabled"
|
|
|
+ v-if="display">上传
|
|
|
</el-button>
|
|
|
<slot name="c_button"></slot>
|
|
|
</template>
|
|
|
<template slot="url" slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- size="small"
|
|
|
- v-if="row.$cellEdit"
|
|
|
- v-model="row.url"
|
|
|
- class="input-with-select"
|
|
|
- >
|
|
|
- <el-button slot="append" @click="singleLineUpload(row)"
|
|
|
- >附件</el-button
|
|
|
- >
|
|
|
+ <el-input placeholder="请输入内容" size="small" v-if="row.$cellEdit" v-model="row.url" class="input-with-select">
|
|
|
+ <el-button slot="append" @click="singleLineUpload(row)">附件</el-button>
|
|
|
</el-input>
|
|
|
<span v-else>{{ row.url }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- icon="el-icon-download"
|
|
|
- :size="scope.size"
|
|
|
- :type="scope.type"
|
|
|
- @click="download(scope)"
|
|
|
- >查看
|
|
|
+ <el-button icon="el-icon-download" :size="scope.size" :type="scope.type" @click="download(scope)">查看
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- :type="scope.type"
|
|
|
- :size="scope.size"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click.stop="rowCell(scope.row, scope.index)"
|
|
|
- :disabled="disabled"
|
|
|
- >
|
|
|
+ <el-button :type="scope.type" :size="scope.size" icon="el-icon-edit"
|
|
|
+ @click.stop="rowCell(scope.row, scope.index)" :disabled="disabled">
|
|
|
{{ scope.row.$cellEdit ? "保存" : "修改" }}
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- :type="scope.type"
|
|
|
- :size="scope.size"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)"
|
|
|
- :disabled="disabled"
|
|
|
- >删除
|
|
|
+ <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)" :disabled="disabled">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- <el-dialog
|
|
|
- title="上传附件"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelBox"
|
|
|
- width="555px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- v-dialog-drag
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- drag
|
|
|
- style="text-align: center"
|
|
|
- ref="upload"
|
|
|
- :action="incomingAction ? incomingAction : action"
|
|
|
- :headers="headers"
|
|
|
- :on-success="onSuccess"
|
|
|
- multiple
|
|
|
- >
|
|
|
+ <el-dialog title="上传附件" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <el-upload class="upload-demo" drag style="text-align: center" ref="upload"
|
|
|
+ :action="incomingAction ? incomingAction : action" :headers="headers" :on-success="onSuccess" multiple
|
|
|
+ :before-upload="beforeUpload">
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
<div class="el-upload__tip" slot="tip">
|
|
@@ -87,23 +39,11 @@
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="修改附件"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelTwo"
|
|
|
- width="555px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- v-dialog-drag
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- drag
|
|
|
- style="text-align: center"
|
|
|
- :action="incomingAction ? incomingAction : action"
|
|
|
- :headers="headers"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="onSuccessTwo"
|
|
|
- >
|
|
|
+ <el-dialog title="修改附件" append-to-body :visible.sync="excelTwo" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <el-upload class="upload-demo" drag style="text-align: center"
|
|
|
+ :action="incomingAction ? incomingAction : action" :headers="headers" :show-file-list="false"
|
|
|
+ :on-success="onSuccessTwo" :before-upload="beforeUpload">
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
<div class="el-upload__tip" slot="tip">
|
|
@@ -111,7 +51,7 @@
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-dialog>
|
|
|
- <!--之前的查看图片弹窗-->
|
|
|
+ <!--之前的查看图片弹窗-->
|
|
|
<!--<el-dialog-->
|
|
|
<!-- width="80%"-->
|
|
|
<!-- title="附件"-->
|
|
@@ -124,91 +64,38 @@
|
|
|
<!-- </div>-->
|
|
|
<!--</el-dialog>-->
|
|
|
|
|
|
- <!-- 新的查看图片弹窗-->
|
|
|
- <PreviewImage
|
|
|
- :visible.sync="innerVisible"
|
|
|
- :currentIndex="0"
|
|
|
- :previewImgList="[imgUrl]"
|
|
|
- />
|
|
|
+ <!-- 新的查看图片弹窗-->
|
|
|
+ <PreviewImage :visible.sync="innerVisible" :currentIndex="0" :previewImgList="[imgUrl]" />
|
|
|
</basic-container>
|
|
|
<span v-else-if="true">
|
|
|
- <avue-crud
|
|
|
- :data="data"
|
|
|
- ref="crud"
|
|
|
- :option="option"
|
|
|
- :key="key"
|
|
|
- @resetColumn="resetColumn"
|
|
|
- @saveColumn="saveColumn"
|
|
|
- >
|
|
|
+ <avue-crud :data="data" ref="crud" :option="option" :key="key" @resetColumn="resetColumn"
|
|
|
+ @saveColumn="saveColumn">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="addDetail"
|
|
|
- :disabled="disabled"
|
|
|
- >上传
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-edit" @click="addDetail" :disabled="disabled">上传
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="url" slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- size="small"
|
|
|
- v-if="row.$cellEdit"
|
|
|
- v-model="row.url"
|
|
|
- class="input-with-select"
|
|
|
- >
|
|
|
- <el-button slot="append" @click="singleLineUpload(row)"
|
|
|
- >附件</el-button
|
|
|
- >
|
|
|
+ <el-input placeholder="请输入内容" size="small" v-if="row.$cellEdit" v-model="row.url" class="input-with-select">
|
|
|
+ <el-button slot="append" @click="singleLineUpload(row)">附件</el-button>
|
|
|
</el-input>
|
|
|
<span v-else>{{ row.url }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- icon="el-icon-download"
|
|
|
- :size="scope.size"
|
|
|
- :type="scope.type"
|
|
|
- @click="download(scope)"
|
|
|
- >查看
|
|
|
+ <el-button icon="el-icon-download" :size="scope.size" :type="scope.type" @click="download(scope)">查看
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- :type="scope.type"
|
|
|
- :size="scope.size"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click.stop="rowCell(scope.row, scope.index)"
|
|
|
- :disabled="disabled"
|
|
|
- >
|
|
|
+ <el-button :type="scope.type" :size="scope.size" icon="el-icon-edit"
|
|
|
+ @click.stop="rowCell(scope.row, scope.index)" :disabled="disabled">
|
|
|
{{ scope.row.$cellEdit ? "保存" : "修改" }}
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- :type="scope.type"
|
|
|
- :size="scope.size"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)"
|
|
|
- :disabled="disabled"
|
|
|
- >删除
|
|
|
+ <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)" :disabled="disabled">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- <el-dialog
|
|
|
- title="上传附件"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelBox"
|
|
|
- width="555px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- v-dialog-drag
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- drag
|
|
|
- style="text-align: center"
|
|
|
- ref="upload"
|
|
|
- :action="action"
|
|
|
- :headers="headers"
|
|
|
- :on-success="onSuccess"
|
|
|
- multiple
|
|
|
- >
|
|
|
+ <el-dialog title="上传附件" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <el-upload class="upload-demo" drag style="text-align: center" ref="upload" :action="action" :headers="headers"
|
|
|
+ :on-success="onSuccess" multiple :before-upload="beforeUpload">
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
<div class="el-upload__tip" slot="tip">
|
|
@@ -216,23 +103,11 @@
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="修改附件"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelTwo"
|
|
|
- width="555px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- v-dialog-drag
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- drag
|
|
|
- style="text-align: center"
|
|
|
- :action="incomingAction ? incomingAction : action"
|
|
|
- :headers="headers"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="onSuccessTwo"
|
|
|
- >
|
|
|
+ <el-dialog title="修改附件" append-to-body :visible.sync="excelTwo" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <el-upload class="upload-demo" drag style="text-align: center"
|
|
|
+ :action="incomingAction ? incomingAction : action" :headers="headers" :show-file-list="false"
|
|
|
+ :on-success="onSuccessTwo" :before-upload="beforeUpload">
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
<div class="el-upload__tip" slot="tip">
|
|
@@ -240,7 +115,7 @@
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-dialog>
|
|
|
- <!--之前的查看图片弹窗-->
|
|
|
+ <!--之前的查看图片弹窗-->
|
|
|
<!--<el-dialog-->
|
|
|
<!-- width="80%"-->
|
|
|
<!-- title="附件"-->
|
|
@@ -254,26 +129,22 @@
|
|
|
<!--</el-dialog>-->
|
|
|
|
|
|
<!-- 新的查看图片弹窗-->
|
|
|
- <PreviewImage
|
|
|
- :visible.sync="innerVisible"
|
|
|
- :currentIndex="0"
|
|
|
- :previewImgList="[imgUrl]"
|
|
|
- />
|
|
|
+ <PreviewImage :visible.sync="innerVisible" :currentIndex="0" :previewImgList="[imgUrl]" />
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getToken } from "@/util/auth";
|
|
|
-import {LTfujianDelete, sharedDeletion} from "@/api/user";
|
|
|
+import { LTfujianDelete, sharedDeletion } from "@/api/user";
|
|
|
import option from "@/views/exportTrade/customerInquiry/config/mainList.json";
|
|
|
import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
import { updateListRemove } from "@/api/uploadFile/upload-file";
|
|
|
-import {deleteImg} from "../../api/basicData/EquipmentArchives";
|
|
|
+import { deleteImg } from "../../api/basicData/EquipmentArchives";
|
|
|
import PreviewImage from '@/components/PreviewImage/index.vue'
|
|
|
export default {
|
|
|
name: "index",
|
|
|
- components:{PreviewImage},
|
|
|
+ components: { PreviewImage },
|
|
|
props: {
|
|
|
data: {
|
|
|
type: Object
|
|
@@ -310,7 +181,7 @@ export default {
|
|
|
action: "/api/blade-resource/oss/endpoint/put-file",
|
|
|
headers: { "Blade-Auth": "Bearer " + getToken() },
|
|
|
option: {},
|
|
|
- key:0,
|
|
|
+ key: 0,
|
|
|
originalOptions: {
|
|
|
dialogDrag: true,
|
|
|
index: true,
|
|
@@ -335,7 +206,7 @@ export default {
|
|
|
prop: "url",
|
|
|
index: 2,
|
|
|
overHidden: true
|
|
|
- },{
|
|
|
+ }, {
|
|
|
type: "select",
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=file_type",
|
|
|
props: {
|
|
@@ -383,7 +254,7 @@ export default {
|
|
|
prop: "url",
|
|
|
index: 2,
|
|
|
overHidden: true
|
|
|
- },{
|
|
|
+ }, {
|
|
|
type: "select",
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=picture_type",
|
|
|
props: {
|
|
@@ -407,55 +278,55 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- // 基础信息轮胎附件
|
|
|
- originalOptionsTwo_LT: {
|
|
|
- dialogDrag: true,
|
|
|
- index: true,
|
|
|
- refreshBtn: false,
|
|
|
- cellBtn: false,
|
|
|
- cancelBtn: false,
|
|
|
- delBtn: false,
|
|
|
- editBtn: false,
|
|
|
- addBtn: false,
|
|
|
- align: "center",
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "文件名称",
|
|
|
- prop: "fileName",
|
|
|
- index: 1,
|
|
|
- width: 140,
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "文件地址",
|
|
|
- prop: "url",
|
|
|
- index: 2,
|
|
|
- overHidden: true
|
|
|
- },{
|
|
|
- type: "select",
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=picture_type",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- label: "文件属性",
|
|
|
- prop: "mainImage",
|
|
|
- search: false,
|
|
|
- index: 3,
|
|
|
- width: 140,
|
|
|
- overHidden: true,
|
|
|
- cell: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- index: 4,
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // 基础信息轮胎附件
|
|
|
+ originalOptionsTwo_LT: {
|
|
|
+ dialogDrag: true,
|
|
|
+ index: true,
|
|
|
+ refreshBtn: false,
|
|
|
+ cellBtn: false,
|
|
|
+ cancelBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ align: "center",
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "文件名称",
|
|
|
+ prop: "fileName",
|
|
|
+ index: 1,
|
|
|
+ width: 140,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "文件地址",
|
|
|
+ prop: "url",
|
|
|
+ index: 2,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=picture_type",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ label: "文件属性",
|
|
|
+ prop: "mainImage",
|
|
|
+ search: false,
|
|
|
+ index: 3,
|
|
|
+ width: 140,
|
|
|
+ overHidden: true,
|
|
|
+ cell: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ index: 4,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
originalOptionsThree: {
|
|
|
dialogDrag: true,
|
|
|
index: true,
|
|
@@ -490,47 +361,47 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- originalOptionsThree_HW: {
|
|
|
- dialogDrag: true,
|
|
|
- index: true,
|
|
|
- refreshBtn: false,
|
|
|
- cellBtn: false,
|
|
|
- cancelBtn: false,
|
|
|
- delBtn: false,
|
|
|
- editBtn: false,
|
|
|
- addBtn: false,
|
|
|
- align: "center",
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "花纹名称",
|
|
|
- prop: "figure",
|
|
|
- index: 1,
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "文件名称",
|
|
|
- prop: "fileName",
|
|
|
- index: 1,
|
|
|
- width: 140,
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "文件地址",
|
|
|
- prop: "url",
|
|
|
- index: 2,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- index: 4,
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ originalOptionsThree_HW: {
|
|
|
+ dialogDrag: true,
|
|
|
+ index: true,
|
|
|
+ refreshBtn: false,
|
|
|
+ cellBtn: false,
|
|
|
+ cancelBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ align: "center",
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "花纹名称",
|
|
|
+ prop: "figure",
|
|
|
+ index: 1,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "文件名称",
|
|
|
+ prop: "fileName",
|
|
|
+ index: 1,
|
|
|
+ width: 140,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "文件地址",
|
|
|
+ prop: "url",
|
|
|
+ index: 2,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ index: 4,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
uploadCount: 0
|
|
|
};
|
|
|
},
|
|
@@ -549,10 +420,10 @@ export default {
|
|
|
this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
|
|
|
} else if (this.enumerationValue === 35.1) {
|
|
|
this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree);
|
|
|
- }else if (this.enumerationValue === 160.1) {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
|
|
|
- }else if (this.enumerationValue === 338) {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
|
|
|
+ } else if (this.enumerationValue === 160.1) {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
|
|
|
+ } else if (this.enumerationValue === 338) {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
|
|
|
} else {
|
|
|
this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);
|
|
|
this.getWorkDicts("picture_type").then(res => {
|
|
@@ -571,7 +442,7 @@ export default {
|
|
|
* 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
* 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
*/
|
|
|
- const inSave = await this.saveColumnData(this.getColumnName(this.enumerationValue),this.option);
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(this.enumerationValue), this.option);
|
|
|
if (inSave) {
|
|
|
this.$message.success("保存成功");
|
|
|
//关闭窗口
|
|
@@ -608,20 +479,20 @@ export default {
|
|
|
this.$message.success("重置成功");
|
|
|
this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
}
|
|
|
- }else if (this.enumerationValue === 160.1) {
|
|
|
- this.option = this.originalOptionsTwo_LT;
|
|
|
- const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
- }else if (this.enumerationValue === 338) {
|
|
|
- this.option = this.originalOptionsThree_HW;
|
|
|
- const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
+ } else if (this.enumerationValue === 160.1) {
|
|
|
+ this.option = this.originalOptionsTwo_LT;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ } else if (this.enumerationValue === 338) {
|
|
|
+ this.option = this.originalOptionsThree_HW;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.option = this.originalOptions;
|
|
|
const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);
|
|
@@ -634,6 +505,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ beforeUpload(file) {
|
|
|
+ if (file.type == "image/jpeg" || file.type == "image/png" || file.type == "image/bmp") {
|
|
|
+ const fileSize = file.size / 1024 / 1024
|
|
|
+ if (fileSize > 5) {
|
|
|
+ this.$message.error("请上传不能超过5M的图片");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const fileSize = file.size / 1024 / 1024
|
|
|
+ if (fileSize > 10) {
|
|
|
+ this.$message.error("请上传不能超过10M的文件");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//新增上传成功
|
|
|
onSuccess(response, file, fileList) {
|
|
|
this.$refs.crud.rowCellAdd({
|
|
@@ -667,18 +553,18 @@ export default {
|
|
|
download(scope) {
|
|
|
if (scope.row.url) {
|
|
|
if (
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".jpg" ||
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".png" ||
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".jpeg" ||
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".JPG" ||
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".PNG" ||
|
|
|
- scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
- ".JPEG"
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".jpg" ||
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".png" ||
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".jpeg" ||
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".JPG" ||
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".PNG" ||
|
|
|
+ scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
|
|
|
+ ".JPEG"
|
|
|
) {
|
|
|
this.imgUrl = scope.row.url;
|
|
|
this.innerVisible = true;
|
|
@@ -704,7 +590,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- console.log(row,657)
|
|
|
+ console.log(row, 657)
|
|
|
if (row.id) {
|
|
|
if (this.typeUpload == "CK") {
|
|
|
updateListRemove(row.id, this.deleteUrl).then(res => {
|
|
@@ -713,15 +599,15 @@ export default {
|
|
|
this.data.splice(index, 1);
|
|
|
}
|
|
|
});
|
|
|
- }else if (this.typeUpload == "LT") {
|
|
|
- LTfujianDelete({ids:row.id}).then(res=>{
|
|
|
- if (res.data.success) {
|
|
|
- this.$message.success("操作成功!");
|
|
|
- this.data.splice(index, 1);
|
|
|
- }
|
|
|
- })
|
|
|
+ } else if (this.typeUpload == "LT") {
|
|
|
+ LTfujianDelete({ ids: row.id }).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.data.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
} else if (this.typeUpload == "SBDAFJ") {
|
|
|
- deleteImg({ids:row.id}).then(res=>{
|
|
|
+ deleteImg({ ids: row.id }).then(res => {
|
|
|
if (res.data.success) {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.data.splice(index, 1);
|