去除字段

zhangtao
laozt 1 year ago
parent 881d12e1bf
commit 54b301831d

@ -10,16 +10,16 @@ ENV = 'production'
VUE_APP_BASE_API = 'http://180.108.205.123:13002'
# 统一登录-内网
VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-内网
VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 统一登录-外网
# VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-外网
# VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -19,7 +19,11 @@
</div>
<div class="content">
<div class="module">
<div class="select" :class="nextStep ? '' : 'nextStepSelect'" @click="selectFirm">
<div
class="select"
:class="nextStep ? '' : 'nextStepSelect'"
@click="selectFirm"
>
<span class="span-one"></span>
<span>选择企业</span>
</div>
@ -90,7 +94,7 @@
</el-option>
</el-select>
</div>
<div class="select-input">
<!-- <div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
@ -101,7 +105,7 @@
>
</el-option>
</el-select>
</div>
</div> -->
<div class="select-input">
<div class="select-span">企业分色:</div>
<el-select v-model="form.entprColor" placeholder="请选择">
@ -161,7 +165,7 @@
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict(scope.row.subdistrict)}}</span>
<span>{{ componendDistrict(scope.row.subdistrict) }}</span>
</template>
</el-table-column>
<el-table-column
@ -256,7 +260,11 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
>
<!-- <div>重点企业数
<span :class=" count == unCount ? 'selectedNumber' : 'unselectedNumber'">{{ unCount }}</span>/
<span class="sum">{{ count }}</span>
@ -265,7 +273,13 @@
</div>
</div>
<div v-else class="release-planning">
<el-form ref="form" :model="form2" label-width="100px" class="form-inline" :rules="rules">
<el-form
ref="form"
:model="form2"
label-width="100px"
class="form-inline"
:rules="rules"
>
<el-form-item label="计划年月:" prop="plannedYear">
<el-date-picker
v-model="form2.plannedYear"
@ -285,7 +299,11 @@
placeholder="请输入计划标题"
></el-input>
</el-form-item>
<el-form-item label="计划内容:" prop="planContent" class="form-textarea">
<el-form-item
label="计划内容:"
prop="planContent"
class="form-textarea"
>
<el-input
v-model="form2.planContent"
type="textarea"
@ -333,31 +351,37 @@ import firmDialog from "@/views/components/firmDialog/index.vue";
import { Loading } from "element-ui";
import { mapState } from "vuex";
export default {
dicts:['category','economic_categories','is_point','entpr_color','major_hazard_level'],
components: { myPagination,firmDialog },
dicts: [
"category",
"economic_categories",
"is_point",
"entpr_color",
"major_hazard_level",
],
components: { myPagination, firmDialog },
data() {
return {
dialogVisible: false,
tableData: [],
listOne: [],
myDistrict:[],
myDistrict: [],
// listTwo: [],
// listThree: [],
// listFour: [],
// listFive: [],
options:[],
options: [],
// optionstwo:[],
props: {
value: "county",
label: "institutionName",
checkStrictly: true
checkStrictly: true,
},
multipleSelection: [],
selected: 0,
nextStep: false,
nextText: "下一步",
workingArea:'',
subdistrict:'',
workingArea: "",
subdistrict: "",
form: {
subdistrict: [],
ecoTypeLarge: "",
@ -375,14 +399,14 @@ export default {
},
rules: {
plannedYear: [
{ required: true, message: '请选择年月', trigger: 'blur' },
{ required: true, message: "请选择年月", trigger: "blur" },
],
planName: [
{ required: true, message: '请输入计划标题', trigger: 'blur' }
{ required: true, message: "请输入计划标题", trigger: "blur" },
],
planContent: [
{ required: true, message: '请输入计划内容', trigger: 'blur' }
]
{ required: true, message: "请输入计划内容", trigger: "blur" },
],
},
total: 0,
pages: {
@ -396,9 +420,9 @@ export default {
// unCount: 0,
// unselected: 0,
selectList: [],
disabled:false,
county:false,
district:[]
disabled: false,
county: false,
district: [],
};
},
computed: {
@ -424,34 +448,34 @@ export default {
// },
methods: {
//
selectFirm(){
if(this.$refs.next.innerText == "发布计划"){
selectFirm() {
if (this.$refs.next.innerText == "发布计划") {
this.nextStep = false;
this.filtrate();
this.nextText = "下一步";
this.multipleSelection.map((item)=>{
this.multipleSelection.map((item) => {
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(item);
});
})
});
}
},
//
componendDistrict(district){
let name
this.district.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
componendDistrict(district) {
let name;
this.district.map((item) => {
if (item.subdistrict == district) {
name = item.institutionName;
} else {
item.children.map((itemTwo)=>{
if(itemTwo.subdistrict == district) {
name = item.institutionName + '-' + itemTwo.institutionName
item.children.map((itemTwo) => {
if (itemTwo.subdistrict == district) {
name = item.institutionName + "-" + itemTwo.institutionName;
}
})
});
}
})
});
// console.log(name)
return name
return name;
},
//
filterTable(a, b) {
@ -474,30 +498,38 @@ export default {
// }
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$nextTick(()=>{
this.$nextTick(() => {
this.$refs.mypagination.defaultPages();
})
let obj
});
let obj;
//
if(!this.disabled) {
if (!this.disabled) {
// console.log('123')
if(Array.isArray(this.form.subdistrict)){
if(this.form.subdistrict.length == 2) {
if (Array.isArray(this.form.subdistrict)) {
if (this.form.subdistrict.length == 2) {
this.subdistrict = this.form.subdistrict[1].slice(0, 10);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else if(this.form.subdistrict.length == 1) {
obj = {
...this.pages,
...this.form,
subdistrict: this.subdistrict,
};
} else if (this.form.subdistrict.length == 1) {
this.subdistrict = this.form.subdistrict[0].slice(0, 7);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
obj = {
...this.pages,
...this.form,
subdistrict: this.subdistrict,
};
} else {
obj = {...this.pages,...this.form}
obj = { ...this.pages, ...this.form };
}
} else {
if(this.county){
if (this.county) {
let subdistrict = this.form.subdistrict.slice(0, 7);
obj = { ...this.pages, ...this.form,subdistrict };
obj = { ...this.pages, ...this.form, subdistrict };
} else {
let subdistrict = this.form.subdistrict.slice(0, 7);
obj = { ...this.pages, ...this.form,subdistrict };
obj = { ...this.pages, ...this.form, subdistrict };
}
}
} else {
@ -506,8 +538,8 @@ export default {
// this.subdistrict = this.form.subdistrict.slice(1, 8);
// obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
// } else if(this.dept.ancestors.split(',').length == 3){
this.subdistrict = this.form.subdistrict.slice(0, 10);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
this.subdistrict = this.form.subdistrict.slice(0, 10);
obj = { ...this.pages, ...this.form, subdistrict: this.subdistrict };
// }
}
// console.log(isAncestors)
@ -517,7 +549,7 @@ export default {
//
trimTrailingZeros(str) {
for (let i = str.length - 1; i >= 0; i--) {
if (str.charAt(i) !== '0') {
if (str.charAt(i) !== "0") {
return str.slice(0, i + 1);
}
}
@ -526,7 +558,7 @@ export default {
},
//
reset() {
this.form= {
(this.form = {
subdistrict: this.workingArea,
frimType: "",
indusTypeClass: "",
@ -534,17 +566,21 @@ export default {
majorHazardLevel: "",
entprColor: "",
uscCode: "",
},
this.pages.pageNum = 1;
}),
(this.pages.pageNum = 1);
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
// let obj = {...this.pages,...this.form}
if(this.dept.ancestors.split(',').length == 2){
if (this.dept.ancestors.split(",").length == 2) {
this.subdistrict = this.workingArea.slice(0, 7);
} else if(this.dept.ancestors.split(',').length == 3){
} else if (this.dept.ancestors.split(",").length == 3) {
this.subdistrict = this.form.subdistrict.slice(0, 10);
}
this.getTable({...this.pages,...this.form,subdistrict:this.subdistrict});
this.getTable({
...this.pages,
...this.form,
subdistrict: this.subdistrict,
});
},
// checkBox
checkSelectable(row) {
@ -567,8 +603,8 @@ export default {
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(item, false);
});
if (item.isPoint == 1 && this.dept.ancestors.split(',').length == 3) {
if(item.district == this.form.subdistrict){
if (item.isPoint == 1 && this.dept.ancestors.split(",").length == 3) {
if (item.district == this.form.subdistrict) {
count += 1;
}
}
@ -577,22 +613,24 @@ export default {
this.unselected = count;
},
//
async gettownNumbers(){
let data = await this.$api.yingji.getBydistrict({district:this.form.subdistrict})
async gettownNumbers() {
let data = await this.$api.yingji.getBydistrict({
district: this.form.subdistrict,
});
this.count = data.data;
},
//
async open(item,dept) {
async open(item, dept) {
this.dialogVisible = true;
// this.dept = dept
let data = await this.$api.yingji.tree();
this.district = data.data
this.commentData(this.district,dept);
this.district = data.data;
this.commentData(this.district, dept);
this.bPlanEnterprise();
this.filtrate()
this.filtrate();
if (item == "newlyIncreased") {
//
if(dept.ancestors.split(',').length == 3){
if (dept.ancestors.split(",").length == 3) {
this.gettownNumbers();
}
// this.getTable(this.pages);
@ -625,8 +663,8 @@ export default {
}
},
//
look(row){
this.$refs.firmDialog.open(row)
look(row) {
this.$refs.firmDialog.open(row);
},
//
async getList(item) {
@ -664,33 +702,33 @@ export default {
}
this.tableData = data.data.list;
// console.log(isAncestors,'isAncestors')
if(this.dept.ancestors.split(',').length == 3) {
this.tableData.forEach((item)=>{
if(item.isPoint == '1') {
if (this.dept.ancestors.split(",").length == 3) {
this.tableData.forEach((item) => {
if (item.isPoint == "1") {
this.$refs.multipleTable.toggleRowSelection(item);
item["multipleTable"] = true;
}
})
});
}
},
//
pagesChange(pages) {
this.pages = pages;
// console.log(this.form)
if(this.dept.ancestors.split(',').length == 2){
if(Array.isArray(this.form.subdistrict)) {
if(this.form.subdistrict.length == 2) {
if (this.dept.ancestors.split(",").length == 2) {
if (Array.isArray(this.form.subdistrict)) {
if (this.form.subdistrict.length == 2) {
this.subdistrict = this.form.subdistrict[1].slice(0, 10);
}
} else {
this.subdistrict = this.form.subdistrict.slice(0, 7);
}
} else if(this.dept.ancestors.split(',').length == 3){
} else if (this.dept.ancestors.split(",").length == 3) {
this.subdistrict = this.form.subdistrict.slice(0, 10);
}
// console.log(this.subdistrict,'this.subdistrict')
// console.log(this.form,'this.form')
this.getTable({...pages,...this.form,subdistrict:this.subdistrict});
this.getTable({ ...pages, ...this.form, subdistrict: this.subdistrict });
},
//
handleSelectionChange(val) {
@ -701,12 +739,36 @@ export default {
getData() {
var myDate = new Date();
var year = myDate.getFullYear(); //var mon = myDate.getMonth() + 1; //
var mon = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1 == 0 ? "00" : myDate.getMonth() + 1;
var date = myDate.getDate() < 10 ? "0" + myDate.getDate() : myDate.getDate(); //
var hours = myDate.getHours() < 10 ? "0" + myDate.getHours() : myDate.getHours(); //
var minutes = myDate.getMinutes() < 10 ? "0" + myDate.getMinutes() : myDate.getMinutes(); //
var seconds = myDate.getSeconds() < 10 ? "0" + myDate.getSeconds() : myDate.getSeconds(); //var now = year + "_" + mon + "_" + date + " "+ hours + ":" + minutes + ":" + seconds;
var now = year + "-" + mon + "-" + date + " " + hours + ":" + minutes + ":" + seconds;
var mon =
myDate.getMonth() + 1 < 10
? "0" + (myDate.getMonth() + 1)
: myDate.getMonth() + 1 == 0
? "00"
: myDate.getMonth() + 1;
var date =
myDate.getDate() < 10 ? "0" + myDate.getDate() : myDate.getDate(); //
var hours =
myDate.getHours() < 10 ? "0" + myDate.getHours() : myDate.getHours(); //
var minutes =
myDate.getMinutes() < 10
? "0" + myDate.getMinutes()
: myDate.getMinutes(); //
var seconds =
myDate.getSeconds() < 10
? "0" + myDate.getSeconds()
: myDate.getSeconds(); //var now = year + "_" + mon + "_" + date + " "+ hours + ":" + minutes + ":" + seconds;
var now =
year +
"-" +
mon +
"-" +
date +
" " +
hours +
":" +
minutes +
":" +
seconds;
return now;
},
//
@ -737,7 +799,7 @@ export default {
// } else {
// this.$message.error("");
// }
// }
// }
else {
this.nextStep = true;
this.nextText = "发布计划";
@ -746,7 +808,9 @@ export default {
this.$refs.form.validate(async (valid) => {
if (valid) {
let downloadLoadingInstance = Loading.service({
text: this.isamend ? "正在修改计划,请稍后" : "正在发布计划,请稍后",
text: this.isamend
? "正在修改计划,请稍后"
: "正在发布计划,请稍后",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
@ -767,7 +831,7 @@ export default {
planNumb,
};
let data;
if (this.isamend) {
obj = { ...obj, id: this.amendId };
data = await this.$api.yingji.bPlanEnterprise("put", obj);
@ -800,16 +864,14 @@ export default {
}
},
//
handleChange(value) {
},
handleChange(value) {},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "success-row";
}
return "";
},
commentData(item,dept) {
commentData(item, dept) {
// item.map((item)=>{
// if(item.children instanceof Array && item.children.length == 0){
// item.county = item.subdistrict
@ -819,40 +881,40 @@ export default {
// this.commentData(item.children,dept)
// }
// })
item.map((item)=>{
item.children.map((itemTwo)=>{
if(itemTwo.children.length == 0){
item.map((item) => {
item.children.map((itemTwo) => {
if (itemTwo.children.length == 0) {
delete itemTwo.children;
}
itemTwo.county = itemTwo.subdistrict
})
})
itemTwo.county = itemTwo.subdistrict;
});
});
// this.myDistrict = item;
this.listOne = item
if(dept.ancestors.split(',').length == 2) {
this.listOne = this.listOne.filter((item)=>{
return item.institutionName == dept.deptName
})
this.listOne.map((item)=>{
if(item.institutionName == dept.deptName) {
this.listOne = item;
if (dept.ancestors.split(",").length == 2) {
this.listOne = this.listOne.filter((item) => {
return item.institutionName == dept.deptName;
});
this.listOne.map((item) => {
if (item.institutionName == dept.deptName) {
// console.log(item.county)
this.form.subdistrict = item.county
this.workingArea = item.county
this.form.subdistrict = item.county;
this.workingArea = item.county;
this.county = true;
// delete item.children
}
})
});
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
this.listOne.map((item)=>{
item.children.map((itemTwo)=>{
if(itemTwo.institutionName == dept.deptName) {
this.form.subdistrict = itemTwo.subdistrict
this.workingArea = itemTwo.county
} else if (dept.ancestors.split(",").length == 3) {
this.listOne.map((item) => {
item.children.map((itemTwo) => {
if (itemTwo.institutionName == dept.deptName) {
this.form.subdistrict = itemTwo.subdistrict;
this.workingArea = itemTwo.county;
this.county = false;
}
})
})
});
});
this.disabled = true;
}
},
@ -1155,7 +1217,7 @@ export default {
.el-input__inner {
height: 33px;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
@ -1164,7 +1226,7 @@ export default {
::v-deep .el-input {
.el-input__inner {
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
@ -1175,7 +1237,7 @@ export default {
.el-textarea__inner {
height: 100%;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}

@ -11,10 +11,10 @@
></executive>
</div>
<div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.ecoTypeLarge" placeholder="请选择">
<div class="select-span">企业规模:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in dict.type.economic_categories"
v-for="item in dict.type.major_hazard_level"
:key="item.value"
:label="item.label"
:value="item.value"
@ -22,7 +22,6 @@
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.indusTypeClass" placeholder="请选择">
@ -35,46 +34,9 @@
</el-option>
</el-select>
</div>
<!-- <div class="select-input">
<div class="select-span">是否重点:</div>
<el-select v-model="form.isPoint" placeholder="请选择">
<el-option
v-for="item in dict.type.is_point"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div> -->
<div class="select-input">
<div class="select-span">企业分色:</div>
<el-select v-model="form.entprColor" placeholder="请选择">
<el-option
v-for="item in dict.type.entpr_color"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
<div class="two-line">
<div class="two-line-left">
<div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in dict.type.major_hazard_level"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="input-input" style="margin-left: 10px">
<div class="select-span">统一社会信用代码:</div>
<el-input
@ -122,7 +84,7 @@
</el-table-column>
<el-table-column
prop="majorHazardLevel"
label="重大危险源等级"
label="企业规模"
width="180"
header-align="center"
>
@ -153,19 +115,6 @@
</div>
</template>
</el-table-column>
<el-table-column
prop="entprColor"
label="企业分色"
header-align="center"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.entpr_color"
:value="scope.row.entprColor ? scope.row.entprColor : '/'"
>
</dict-tag>
</template>
</el-table-column>
<el-table-column
prop="uscCode"
@ -238,8 +187,8 @@
</el-dialog>
</div>
</template>
<script>
<script>
import myPagination from "@/views/components/myPagination/index.vue";
import { businessList, listDist, xzTree } from "@/api/yingji/keyEnterprise";
// import { mapState } from "vuex";
@ -454,7 +403,7 @@ export default {
},
{
eng: "majorHazardLevel",
label: "重大危险源等级",
label: "企业规模",
value: "",
},
{
@ -653,7 +602,7 @@ export default {
});
}
this.listDes.forEach((value1, index1) => {
//
//
if (value1.eng == "majorHazardLevel") {
this.listDes[index1].value = this.filterTable1(
this.dict.type.major_hazard_level,
@ -706,13 +655,6 @@ export default {
//
//
//
//
if (value1.eng == "entprColor") {
this.listDes[index1].value = this.filterTable1(
this.dict.type.entpr_color,
value1.value
);
}
//
if (value1.eng == "indusTypeClass") {
this.listDes[index1].value = this.filterTable1(
@ -727,7 +669,7 @@ export default {
value1.value
);
}
if (value1.value == null ) {
if (value1.value == null) {
this.listDes[index1].value = "/";
}
if (value1.value == "false") {
@ -801,7 +743,7 @@ export default {
// },
};
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.isStyle {
color: #f71052;
}
@ -941,7 +883,11 @@ export default {
.two-line {
display: flex;
align-items: center;
justify-content: space-between;
.select-input {
margin-left: 10px;
}
.two-line-left {
display: flex;
align-items: center;
@ -953,6 +899,7 @@ export default {
width: 355px;
display: flex;
align-items: center;
.select-span {
font-size: 14px;
font-family: "Alibaba PuHuiTi";
@ -1092,4 +1039,3 @@ export default {
}
}
</style>
Loading…
Cancel
Save