flat: 修改cityId备份

This commit is contained in:
Apcallover
2024-04-22 22:29:46 +08:00
parent 32390b29b0
commit 381f2273b3
3 changed files with 487 additions and 454 deletions

View File

@@ -1,9 +1,11 @@
<template>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
@row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
@row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
@search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
@on-load="onLoad">
<!-- <template slot="menu" slot-scope="{row}">-->
<!-- <el-button-->
<!-- v-if="vaildData(permission.manage_station_mainList_stop, false) && row.status !== 9"-->
@@ -13,37 +15,42 @@
<!-- type="text"-->
<!-- >终止合作</el-button>-->
<!-- </template>-->
<template slot="cityIdForm" slot-scope="{disabled}">
<jl-city-cascader :disabled="disabled" v-model="form.cityId" filterable clearable></jl-city-cascader>
<template slot="authUrlIdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.authUrlId"
:preview-src-list="[form.authUrlId]"></el-image>
</template>
<template slot="authUrlIdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.authUrlId"
:preview-src-list="[form.authUrlId]"></el-image>
</template>
<template slot="authUrlIdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.authUrlId"
:preview-src-list="[form.authUrlId]"></el-image>
:preview-src-list="[form.authUrlId]"></el-image>
</template>
<template slot="identityUrl4IdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.identityUrl4Id"
:preview-src-list="[form.identityUrl4Id]"></el-image>
:preview-src-list="[form.identityUrl4Id]"></el-image>
</template>
<template slot="identityUrl5IdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.identityUrl5Id"
:preview-src-list="[form.identityUrl5Id]"></el-image>
:preview-src-list="[form.identityUrl5Id]"></el-image>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import { companyInfoAdd, companyStationInfo, companyDetail, companyUpdate, stationStop, removeMainList } from "@/api/manage/main";
import {
companyInfoAdd,
companyStationInfo,
companyDetail,
companyUpdate,
stationStop,
removeMainList
} from "@/api/manage/main";
// import { getStationDic } from "@/api/manage/station";
import { mapGetters } from "vuex";
import { isMobile, check18IdCardNo, validatenull } from "@/util/validate";
import { putFile } from "@/api/resource/oss";
import {mapGetters} from "vuex";
import {isMobile, check18IdCardNo, validatenull} from "@/util/validate";
import {putFile} from "@/api/resource/oss";
import {getTradeDic} from "@/api/manage/trade";
import {companyEnum} from "@/common/dic"
import {addressColumn, companyEnum} from "@/common/dic"
const accept = [
"image/png",
"image/jpeg",
@@ -189,12 +196,12 @@ export default {
],
},
{
type: "input",
type: "select",
label: "所在地区",
prop: "cityId",
span: 12,
dicData: addressColumn,
display: true,
formslot: true,
rules: [
{
required: true,
@@ -279,25 +286,25 @@ export default {
value: "id"
},
dicFormatter(resp) {
var result=[];
var result = [];
resp.data.forEach(ele => {
if(ele.name!="1"){
if (ele.name != "1") {
result.push(ele)
}
});
return result;
},
rules:[
rules: [
{
required:true,
validator: (rule,value,callback) => {
if(value=='请选择行业'){
required: true,
validator: (rule, value, callback) => {
if (value == '请选择行业') {
callback(new Error('请选择行业'));
}else{
} else {
callback();
}
},
trigger:'blur'
trigger: 'blur'
}
]
},
@@ -438,8 +445,8 @@ export default {
const h = this.$createElement;
this.$confirm(
h("div", null, [
h("p", { style: "font-size: 16px" }, "您确定要删除此消息吗? "),
h("p", { style: "color: red" }, "一旦删除则无法找回"),
h("p", {style: "font-size: 16px"}, "您确定要删除此消息吗? "),
h("p", {style: "color: red"}, "一旦删除则无法找回"),
]),
{
type: "warning",
@@ -450,7 +457,7 @@ export default {
}
)
.then(() => {
return removeMainList({ id: row.id, isDeleted: 1});
return removeMainList({id: row.id, isDeleted: 1});
})
.then(() => {
this.$message({
@@ -459,7 +466,8 @@ export default {
});
this.refreshChange();
})
.catch(() => { });
.catch(() => {
});
},
rowSave(row, done, loading) {
console.log('rowSave')
@@ -595,7 +603,7 @@ export default {
stop(row) {
let h = this.$createElement;
this.$confirm(
h("p", { style: "color: #F56C6C" }, "一旦终止结算将会终止"),
h("p", {style: "color: #F56C6C"}, "一旦终止结算将会终止"),
"您确定要终止与此公司的合作吗?",
{
confirmButtonText: "确定",