计划管理增删改查

lijinlong^2
吕天方 1 year ago
parent da99fe292a
commit 31901b139a

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 12:39:14
* @LastEditTime: 2023-09-28 13:22:58
*/
import request from '@/utils/request'
@ -86,4 +86,5 @@ export default {
params
});
},
};

@ -1,3 +1,11 @@
/*
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-26 13:45:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-28 16:55:12
*/
import router from './router'
import store from './store'
import { Message } from 'element-ui'
@ -19,6 +27,7 @@ router.beforeEach((to, from, next) => {
next({ path: '/' })
NProgress.done()
} else {
store.dispatch("Getdistrict");
if (store.getters.roles.length === 0) {
isRelogin.show = true
// 判断当前用户是否已拉取完user_info信息

@ -1,4 +1,5 @@
import { login, login2, logout, getInfo } from "@/api/login";
import { xzTree, listDist } from "@/api/yingji/keyEnterprise";
import { getToken, setToken, removeToken } from "@/utils/auth";
const user = {
@ -14,13 +15,17 @@ const user = {
oldRouter: [],
newRouter: [],
old1: [],
new1: []
new1: [],
district:[],
},
mutations: {
setOld: (state, route) => {
state.old1 = route
},
SET_DISTRICT: (state,data) => {
state.district = data
},
setNew: (state, route) => {
state.new1 = route
},
@ -69,6 +74,19 @@ const user = {
});
});
},
// 获取行政区划
Getdistrict({ commit }){
return new Promise((resolve, reject) => {
xzTree()
.then((res) => {
commit("SET_DISTRICT", res.data);
resolve();
})
.catch((error) => {
reject(error);
});
});
},
// 匿名
login2({ commit }, userInfo) {
const username = userInfo.username.trim();

@ -1,326 +1,347 @@
<template>
<el-dialog
:visible.sync="dialogVisible"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="80%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">新增计划</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="Close" />
</div>
<div class="content">
<div class="module">
<div class="select" :class="nextStep ? '' : 'nextStepSelect'" @click="selectFirm">
<span class="span-one"></span>
<span>选择企业</span>
</div>
<div class="issue" :class="nextStep ? 'nextStepIssue' : ''">
<span class="span-one"></span>
<span>发布计划</span>
<div>
<el-dialog
:visible.sync="dialogVisible"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="85%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">新增计划</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="Close" />
</div>
<div v-if="!nextStep">
<div class="filtrate">
<div class="select-input">
<div class="select-span">行政区划:</div>
<el-cascader
v-model="form.subdistrict"
placeholder="请选择"
:options="listOne"
:props="props"
:disabled="disabled"
@change="handleChange"
>
</el-cascader>
<div class="content">
<div class="module">
<div class="select" :class="nextStep ? '' : 'nextStepSelect'" @click="selectFirm">
<span class="span-one"></span>
<span>选择企业</span>
</div>
<!-- <div class="select-input">
<div class="select-span">企业类型:</div>
<el-select v-model="form.frimType" placeholder="请选择">
<el-option
v-for="item in options"
: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.economicsType" placeholder="请选择">
<el-option
v-for="item in optionstwo.economic_categories"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
<div class="issue" :class="nextStep ? 'nextStepIssue' : ''">
<span class="span-one"></span>
<span>发布计划</span>
</div>
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.indusTypeClass" placeholder="请选择">
<el-option
v-for="(item,index) in optionstwo.category"
:key="index"
:label="item.dictLabel"
:value="item.dictValue"
</div>
<div v-if="!nextStep">
<div class="filtrate">
<div class="select-input">
<div class="select-span">行政区划:</div>
<el-cascader
v-model="form.subdistrict"
placeholder="请选择"
:options="listOne"
:props="props"
:disabled="disabled"
@change="handleChange"
>
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">是否重点:</div>
<el-select v-model="form.isPoint" placeholder="请选择">
<el-option label="是" value="1"></el-option>
<el-option label="否" value="2"></el-option>
</el-select>
</el-cascader>
</div>
<!-- <div class="select-input">
<div class="select-span">企业类型:</div>
<el-select v-model="form.frimType" placeholder="请选择">
<el-option
v-for="item in options"
: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.economicsType" placeholder="请选择">
<el-option
v-for="item in dict.type.economic_categories"
: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.indusTypeClass" placeholder="请选择">
<el-option
v-for="item in dict.type.category"
: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.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.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="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 class="bottom"> -->
<div class="input-input">
<el-input
v-model="form.uscCode"
placeholder="请输入企业名称/统一信用代码"
></el-input>
</div>
<div class="btns">
<div class="select-btn" @click="filtrate"></div>
<div class="select-btn reset" @click="reset"></div>
</div>
<!-- </div> -->
</div>
<div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in optionstwo.major_hazard_level"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
<div class="tables" v-loading="loading">
<el-table
:data="tableData"
style="width: 100%"
:border="false"
ref="multipleTable"
tooltip-effect="light"
@selection-change="handleSelectionChange"
row-key="uscCode"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
reserve-selection
:selectable="checkSelectable"
width="45"
header-align="center"
>
</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 optionstwo.entpr_color"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
</el-table-column>
<el-table-column
prop="entprName"
label="企业名称"
show-overflow-tooltip
header-align="center"
>
</el-option>
</el-select>
</div>
<!-- <div class="bottom"> -->
<div class="input-input">
<el-input
v-model="form.uscCode"
placeholder="请输入企业名称/统一信用代码"
></el-input>
</el-table-column>
<el-table-column
prop="subdistrict"
label="行政区划"
show-overflow-tooltip
width="150"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict("0" + scope.row.subdistrict) }}</span>
</template>
</el-table-column>
<el-table-column
prop="indusTypeClass"
label="行业类型"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.category"
:value="scope.row.indusTypeClass"
>
</dict-tag>
</template>
</el-table-column>
<el-table-column
prop="ecoTypeLarge"
label="经济类型"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.economic_categories"
:value="scope.row.ecoTypeLarge"
>
</dict-tag>
</template>
</el-table-column>
<el-table-column
prop="majorHazardLevel"
label="重大危险源等级"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.major_hazard_level"
:value="scope.row.majorHazardLevel"
>
</dict-tag>
</template>
</el-table-column>
<el-table-column
prop="enterColorChart"
label="企业分色"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.entpr_color"
:value="scope.row.enterColorChart ? scope.row.enterColorChart : '未知'"
>
</dict-tag>
</template>
</el-table-column>
<el-table-column
prop="uscCode"
label="统一社会信用代码"
show-overflow-tooltip
width="150"
header-align="center"
>
</el-table-column>
<el-table-column
prop="isPoint"
label="是否重点"
header-align="center"
>
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
:class="scope.row.isPoint == '1' ? 'isStyle' : ''"
>
<span v-if="scope.row.isPoint == '1'"></span>
<span v-if="scope.row.isPoint == '2'"></span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center">
<template slot-scope="scope">
<div class="tabs-btns">
<div class="look" @click="look(scope.row)">
<img src="@/assets/images/lookInfo.png" alt="" />
<span>查看详情</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="btns">
<div class="select-btn" @click="filtrate"></div>
<div class="select-btn reset" @click="reset"></div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination">
<!-- <div>重点企业数
<span :class=" count == unCount ? 'selectedNumber' : 'unselectedNumber'">{{ unCount }}</span>/
<span class="sum">{{ count }}</span>
</div> -->
</my-pagination>
</div>
<!-- </div> -->
</div>
<div class="tables" v-loading="loading">
<el-table
:data="tableData"
style="width: 100%"
:border="false"
ref="multipleTable"
tooltip-effect="light"
@selection-change="handleSelectionChange"
row-key="uscCode"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
reserve-selection
:selectable="checkSelectable"
width="45"
header-align="center"
>
</el-table-column>
<el-table-column
prop="entprName"
label="企业名称"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column
prop="subdistrict"
label="行政区划"
show-overflow-tooltip
width="150"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict("0" + scope.row.subdistrict) }}</span>
</template>
</el-table-column>
<el-table-column
prop="indusTypeClass"
label="行业类型"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
scope.row.indusTypeClass != "null"
? filterTable(optionstwo.category, scope.row.indusTypeClass)
: ""
}}
</div>
</template>
</el-table-column>
<!-- <el-table-column
prop="indusTypeClass"
label="企业类型"
show-overflow-tooltip
header-align="center"
>
</el-table-column> -->
<el-table-column
prop="majorHazardLevel"
label="重大危险源等级"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
filterTable(
optionstwo.major_hazard_level,
scope.row.majorHazardLevel
)
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="enterColorChart"
label="企业分色"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
scope.row.enterColorChart != "null"
? filterTable(optionstwo.entpr_color, scope.row.enterColorChart)
: ""
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="uscCode"
label="统一社会信用代码"
show-overflow-tooltip
width="150"
header-align="center"
>
</el-table-column>
<el-table-column
prop="isPoint"
label="是否重点"
header-align="center"
>
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
:class="scope.row.isPoint == '1' ? 'isStyle' : ''"
>
<span v-if="scope.row.isPoint == '1'"></span>
<span v-if="scope.row.isPoint == '2'"></span>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination">
<!-- <div>重点企业数
<span :class=" count == unCount ? 'selectedNumber' : 'unselectedNumber'">{{ unCount }}</span>/
<span class="sum">{{ count }}</span>
</div> -->
</my-pagination>
</div>
</div>
<div v-else class="release-planning">
<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"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年月"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划标题:" prop="planName">
<el-input
v-model="form2.planName"
:maxlength="50"
placeholder="请输入计划标题"
></el-input>
</el-form-item>
<el-form-item label="计划内容:" prop="planContent" class="form-textarea">
<el-input
v-model="form2.planContent"
type="textarea"
resize="none"
placeholder="请输入计划内容"
></el-input>
</el-form-item>
<el-form-item label="备注:" class="form-textarea">
<el-input
v-model="form2.remark"
type="textarea"
resize="none"
placeholder="请输入备注"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="next">
<div class="selected">
已选择<span>{{ selected }}</span
>家企业
<div v-else class="release-planning">
<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"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年月"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划标题:" prop="planName">
<el-input
v-model="form2.planName"
:maxlength="50"
placeholder="请输入计划标题"
></el-input>
</el-form-item>
<el-form-item label="计划内容:" prop="planContent" class="form-textarea">
<el-input
v-model="form2.planContent"
type="textarea"
resize="none"
placeholder="请输入计划内容"
></el-input>
</el-form-item>
<el-form-item label="备注:" class="form-textarea">
<el-input
v-model="form2.remark"
type="textarea"
resize="none"
placeholder="请输入备注"
></el-input>
</el-form-item>
</el-form>
</div>
<div
class="btn"
:class="nextStep ? 'selectBtn' : ''"
@click="next"
ref="next"
>
{{ nextText }}
<div class="next">
<div class="selected">
已选择<span>{{ selected }}</span
>家企业
</div>
<div
class="btn"
:class="nextStep ? 'selectBtn' : ''"
@click="next"
ref="next"
>
{{ nextText }}
</div>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
<firm-dialog ref="firmDialog"></firm-dialog>
</div>
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue";
import firmDialog from "@/views/components/firmDialog/index.vue";
import { Loading } from "element-ui";
import { mapState } from "vuex";
export default {
components: { myPagination },
dicts:['category','economic_categories','is_point','entpr_color','major_hazard_level'],
components: { myPagination,firmDialog },
data() {
return {
dialogVisible: false,
tableData: [],
listOne: [],
myDistrict:[],
// listTwo: [],
// listThree: [],
// listFour: [],
// listFive: [],
options:[],
optionstwo:[],
// optionstwo:[],
props: {
value: "county",
label: "institutionName",
@ -376,6 +397,8 @@ export default {
computed: {
...mapState({
dept: (state) => state.user.dept,
district: (state) => state.user.district,
// mydict: (state) => state.user.mydict,
}),
},
watch:{
@ -398,12 +421,17 @@ export default {
if(this.$refs.next.innerText == "发布计划"){
this.nextStep = false;
this.nextText = "下一步";
this.multipleSelection.map((item)=>{
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(item);
});
})
}
},
//
componendDistrict(district){
let name
this.listOne.map((item)=>{
this.myDistrict.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
} else {
@ -437,10 +465,11 @@ export default {
// }
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
this.$nextTick(()=>{
this.$refs.mypagination.defaultPages();
})
let obj
// console.log(this.form.subdistrict)
//
//
if(!this.disabled) {
if(this.form.subdistrict.length > 0){
if(this.form.subdistrict.length == 2) {
@ -456,14 +485,14 @@ export default {
obj = this.pages
}
} else {
//
if(this.dept.ancestors.split(',').length == 2) {
this.subdistrict = this.form.subdistrict.slice(1, 8);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else if(this.dept.ancestors.split(',').length == 3){
//
// if(this.dept.ancestors.split(',').length == 2) {
// 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(1, 11);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
}
// }
}
// obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
this.getTable(obj);
@ -535,8 +564,7 @@ export default {
async open(item,dept) {
this.dialogVisible = true;
// this.dept = dept
let data = await this.$api.yingji.tree(); //
this.commentData(data.data,dept);
this.commentData(this.district,dept);
this.bPlanEnterprise();
this.filtrate()
if (item == "newlyIncreased") {
@ -573,6 +601,10 @@ export default {
this.$emit("close");
}
},
//
look(row){
this.$refs.firmDialog.open(row)
},
//
async getList(item) {
let data = await this.$api.yingji.bPlanManageTwo(item.id);
@ -743,19 +775,20 @@ export default {
this.commentData(item.children,dept)
}
})
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.form.subdistrict = item.county
this.workingArea = item.county
delete item.children
}
})
this.disabled = true;
// this.listOne.map((item)=>{
// if(item.institutionName == dept.deptName) {
// this.form.subdistrict = item.county
// this.workingArea = item.county
// delete item.children
// }
// })
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
this.listOne.map((item)=>{
if(item.institutionName == dept.deptName) {
@ -765,7 +798,6 @@ export default {
})
this.disabled = true;
}
this.listOne = item;
},
},
async mounted() {
@ -777,8 +809,8 @@ export default {
// list: "major_hazard_level",
// }); //
// let listFive = await this.$api.yingji.dictdata({ list: "entpr_color" }); //
let dictdata = await this.$api.yingji.dictdata({ list: "economic_categories,category,major_hazard_level,entpr_color"})
this.optionstwo = dictdata.data;
// let dictdata = await this.$api.yingji.dictdata({ list: "economic_categories,category,major_hazard_level,entpr_color"})
// this.optionstwo = this.mydict;
// this.listTwo = listTwo.data.economic_categories;
// this.listThree = listThree.data.category;
// this.listFour = listFour.data.major_hazard_level;
@ -880,7 +912,7 @@ export default {
flex-wrap: wrap;
padding-bottom: 10px;
.select-input {
// margin-right: 10px;
margin-right: 10px;
margin-top: 20px;
display: flex;
align-items: center;
@ -993,6 +1025,26 @@ export default {
}
.tables {
// background-color: #eaf2fd;
.tabs-btns {
display: flex;
align-items: center;
justify-content: center;
.look {
display: flex;
align-items: center;
cursor: pointer;
img {
width: 20px;
margin-right: 5px;
}
span {
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #045ffd;
}
}
}
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);

@ -0,0 +1,467 @@
<template>
<el-dialog
:visible.sync="addShow"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="60%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">企业详情</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="Close" />
</div>
<div class="content">
<div class="filtrate">
<el-descriptions :column="2" border>
<el-descriptions-item
:label="item.label"
v-for="(item, index) in listDes"
:key="index"
>
{{
item.value == "null"
? ""
: item.value == "false"
? "暂无"
: item.value
}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
addShow: false,
listDes: [
{
eng: "bizAddr",
label: "生产经营地址",
value: "",
},
{
eng: "bossEmail",
label: "主要负责人电子邮箱",
value: "",
},
{
eng: "bossMobtel",
label: "主要负责人移动电话",
value: "",
},
{
eng: "bossTel",
label: "主要负责人固定电话",
value: "",
},
{
eng: "businessScope",
label: "经营范围",
value: "",
},
{
eng: "contactEmail",
label: "电子邮箱",
value: "",
},
{
eng: "contactQq",
label: "联系QQ号码",
value: "",
},
{
eng: "contactTel",
label: "企业固定电话",
value: "",
},
{
eng: "cseNum",
label: "注册安全工程师人员数量",
value: "",
},
{
eng: "doublePreven",
label: "是否开展双重预防机制",
value: "",
},
{
eng: "employeeNum",
label: "从业人员数量",
value: "",
},
{
eng: "enterColorChart",
label: "企业分色图",
value: "",
},
{
eng: "entprName",
label: "企业名称",
value: "",
},
{
eng: "entprPlaneGragh",
label: "企业平面图",
value: "",
},
{
eng: "floorArea",
label: "占地面积(㎡)",
value: "",
},
{
eng: "fullEmegNum",
label: "专职应急管理人员数量",
value: "",
},
{
eng: "fullSafety",
label: "是否有专职安全人员",
value: "",
},
{
eng: "fullSafetyNum",
label: "专职安全生产管理人员数量",
value: "",
},
{
eng: "gridCode",
label: "网格编码",
value: "",
},
{
eng: "gridEntprStatus",
label: "网格对企业的关停和恢复",
value: "",
},
{
eng: "groupCompName",
label: "集团公司名称",
value: "",
},
{
eng: "indusTypeClass",
label: "行业类别门类",
value: "",
},
{
eng: "industryRefer",
label: "工贸涉及(专项治理类别)",
value: "",
},
{
eng: "infoYear",
label: "数据年份",
value: "",
},
{
eng: "isPoint",
label: "是否重点",
value: "",
},
{
eng: "latitudeGps",
label: "纬度(度) 84",
value: "",
},
{
eng: "legalPerson",
label: "法定代表人",
value: "",
},
{
eng: "localSafetyAdmin",
label: "属地安监机构",
value: "",
},
{
eng: "longitudeGps",
label: "经度(度) 84",
value: "",
},
{
eng: "mainProduct",
label: "主要产品",
value: "",
},
{
eng: "majorHazardInstallations",
label: "是否存在重大危险源",
value: "",
},
{
eng: "majorHazardLevel",
label: "重大危险源等级",
value: "",
},
{
eng: "operatingStatus",
label: "经营状态",
value: "",
},
{
eng: "parentCompName",
label: "母公司名称",
value: "",
},
{
eng: "partSafetyNum",
label: "兼职安全生产管理人员数量",
value: "",
},
{
eng: "regAddr",
label: "注册地址",
value: "",
},
{
eng: "regCapi",
label: "注册资金(万元)",
value: "",
},
{
eng: "safetyDepart",
label: "是否有专门安全机构",
value: "",
},
{
eng: "safetyDepartDuty",
label: "安全管理机构职责",
value: "",
},
{
eng: "safetyDepartName",
label: "安全管理机构名称",
value: "",
},
{
eng: "safetyDepartNum",
label: "安全管理机构成员数量",
value: "",
},
{
eng: "safetyEmail",
label: "安全负责人电子邮箱",
value: "",
},
{
eng: "safetyManager",
label: "安全负责人",
value: "",
},
{
eng: "safetyMobtel",
label: "安全负责人移动电话",
value: "",
},
{
eng: "safetySupervisionLevel",
label: "安全监管等级",
value: "",
},
{
eng: "safetyTel",
label: "安全负责人固定电话",
value: "",
},
{
eng: "setupDate",
label: "成立日期",
value: "",
},
{
eng: "sourceData",
label: "数据来源",
value: "",
},
{
eng: "specialGovernance",
label: "专项治理类别",
value: "",
},
{
eng: "speclalOperationNum",
label: "特种作业人员数量",
value: "",
},
{
eng: "standLevel",
label: "标准化等级",
value: "",
},
{
eng: "stateOwed",
label: "是否为国有企业",
value: "",
},
{
eng: "supervisionLarge",
label: "行业监管大类",
value: "",
},
{
eng: "supervisionSmall",
label: "行业监管小类",
value: "",
},
{
eng: "uscCode",
label: "统一社会信用代码",
value: "",
},
],
}
},
methods:{
async open(option) {
this.addShow = true;
const { bizAddr,
bossEmail,
bossMobtel,
bossTel,
businessScope,
contactEmail,
contactQq,
contactTel,
cseNum,
doublePreven,
employeeNum,
enterColorChart,
entprName,
entprPlaneGragh,
floorArea,
fullEmegNum,
fullSafety,
fullSafetyNum,
gridCode,
gridEntprStatus,
groupCompName,
indusTypeClass,
industryRefer,
infoYear,
isPoint,
latitudeGps,
legalPerson,
localSafetyAdmin,
longitudeGps,
mainProduct,
majorHazardInstallations,
majorHazardLevel,
operatingStatus,
parentCompName,
partSafetyNum,
regAddr,
regCapi,
safetyDepart,
safetyDepartDuty,
safetyDepartName,
safetyDepartNum,
safetyEmail,
safetyManager,
safetyMobtel,
safetySupervisionLevel,
safetyTel,
setupDate,
sourceData,
specialGovernance,
speclalOperationNum,
standLevel,
stateOwed,
supervisionLarge,
supervisionSmall,
uscCode } = option
this.changeDescriptions(this.listDes,option)
},
Close(item) {
this.addShow = false;
},
changeDescriptions(arr,arr2){
for (let key in arr2) {
if (arr2.hasOwnProperty(key)) {
arr.map((item)=>{
if(key == item.eng){
item.value = arr2[key] || '空'
if(item.eng == 'isPoint'){
item.value = arr2[key] == '1' ? '是':arr2[key] == '2' ? '否':''
}
}
})
}
}
}
},
}
</script>
<style lang="scss" scoped>
::v-deep .el-descriptions-row th {
width: 20% !important;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
::v-deep .el-descriptions-row td {
width: 30% !important;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
.dialog-slot {
.closeClick {
position: absolute;
top: 0;
right: 0;
padding: 10px 20px;
width: 100%;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
background: #f8f9fa;
box-shadow: 0px 1px 0px 0px #dbe0e8;
background-color: #e0eaf8;
img {
width: 18px;
height: 18px;
cursor: pointer;
}
.newplan {
display: flex;
align-items: center;
.line {
margin-right: 10px;
width: 5px;
height: 16px;
background-color: #1e70de;
}
.span {
font-size: 16px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #1e70de;
}
}
}
.content {
// padding: 15px 10px;
.filtrate {
padding-bottom: 10px;
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>

@ -0,0 +1,259 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-28 11:25:48
* @LastEditors: JC9527
* @LastEditTime: 2023-09-28 16:41:42
-->
<template>
<el-dialog
:visible.sync="dialogVisible"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="50%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">详情</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="Close" />
</div>
<el-form ref="form" label-width="80px">
<el-form-item label="企业名称:" class="form-input">
<el-input v-model="form.name" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="行政区划:" class="form-input">
<el-input v-model="form.district" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="发布时间:" class="form-input">
<el-input v-model="form.createTime" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="年月:" class="form-input">
<el-input v-model="form.plannedYear" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="计划标题:">
<el-input v-model="form.planName" :readonly="readonly"></el-input>
</el-form-item>
<el-form-item label="计划内容:" class="form-textarea">
<el-input
v-model="form.planContent"
type="textarea"
resize="none"
:readonly="readonly"
placeholder="请输入计划内容"
></el-input>
</el-form-item>
<el-form-item label="备注:" class="form-textarea">
<el-input
v-model="form.remark"
type="textarea"
resize="none"
:readonly="readonly"
placeholder="请输入备注"
></el-input>
</el-form-item>
<el-form-item class="btns">
<el-button type="primary" @click="onSubmit" v-if="!readonly"></el-button>
<el-button @click="Close"></el-button>
</el-form-item>
</el-form>
</div>
</el-dialog>
</template>
<script>
import { mapState } from "vuex";
import { Loading } from "element-ui";
export default {
data() {
return {
dialogVisible:false,
mydistrict:'',
form:{
name:'测试活动名称',
district:'',
createTime:'',
plannedYear:'',
planName:'',
planContent:'',
remark:''
},
id:'',
readonly:false,
}
},
computed: {
...mapState({
district: (state) => state.user.district,
}),
},
methods:{
open(item,id) {
console.log(item)
this.id = item.id
this.getMyData(item.id)
if(id == 0) {
this.readonly = true;
} else {
this.readonly = false;
}
this.dialogVisible = true;
},
async getMyData(id){
// console.log(id)
// console.log(data)
let data = await this.$api.yingji.bPlanManageTwo(id)
if(data.code == 200){
let { district,createTime,plannedYear,planName,planContent,remark } = data.data
this.mydistrict = district
let myDistrict = this.componendDistrict(district)
let mycreateTime = createTime.split(' ')[0]
this.form = { district:myDistrict,createTime:mycreateTime,plannedYear,planName,planContent,remark }
}
},
Close(item) {
this.dialogVisible = false;
Object.keys(this.form).forEach((key) => (this.form[key] = ""));
if (item == "newsuccess") {
this.$emit("close");
}
},
//
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;
return now;
},
onSubmit(){
if(this.form.planContent && this.form.planName){
this.$modal.confirm("你确认修改吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async() => {
try {
let downloadLoadingInstance = Loading.service({
text: "正在删除计划,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
// console.log(this.form)
const { planName,remark,planContent } = this.form;
let obj = {updateTime:this.getData(),planContent:planContent,planName:planName,remark:remark,id:this.id}
// console.log(obj)
let data = await this.$api.yingji.bPlanEnterprise('put',obj)
console.log(data)
if(data.code == 200){
downloadLoadingInstance.close();
this.Close("newsuccess")
}
} catch (error) {
}
})
}
},
//
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
}
})
}
})
return name
},
},
}
</script>
<style lang="scss" scoped>
.dialog-slot {
.closeClick {
position: absolute;
top: 0;
right: 0;
padding: 10px 20px;
width: 100%;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
background: #f8f9fa;
box-shadow: 0px 1px 0px 0px #dbe0e8;
background-color: #e0eaf8;
img {
width: 18px;
height: 18px;
cursor: pointer;
}
.newplan {
display: flex;
align-items: center;
.line {
margin-right: 10px;
width: 5px;
height: 16px;
background-color: #1e70de;
}
.span {
font-size: 16px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #1e70de;
}
}
}
.form-input {
display: inline-block;
width: 50%;
}
::v-deep .el-input {
.el-input__inner {
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
}
}
.form-textarea {
::v-deep .el-textarea {
height: 180px;
.el-textarea__inner {
height: 100%;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
}
}
}
.btns {
text-align: right;
::v-deep .el-button {
border-radius: 4px;
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>

@ -185,6 +185,7 @@ export default {
this.getCode();
}
});
}
});
},

@ -2,8 +2,8 @@
<div class="mainBox">
<div class="select-nav">
<div class="left-nav" v-if="activeIndex == 1">
<div class="navText">:</div>
<el-select v-model="ruleForm.date" placeholder="请选择年" size="mini">
<div class="navText">:</div>
<el-select v-model="ruleForm.date" placeholder="请选择年" size="mini">
<el-option
v-for="item in options"
:key="item.value"
@ -97,7 +97,7 @@
{{ scope.row.deptName.slice(scope.row.deptName.length - 1) }}
</template>
</el-table-column> -->
<el-table-column
<!-- <el-table-column
prop="enterpriseCount"
label="省重点计划数"
header-align="center"
@ -138,7 +138,7 @@
<template slot-scope="scope">
{{ scope.row.a ||0}}%
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
prop="totalPlanCount"
label="合计计划数"
@ -167,12 +167,12 @@
</el-table-column>
</el-table>
</div>
<div class="pagination">
<!-- <div class="pagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
></my-pagination>
</div>
</div> -->
</div>
</div>
</template>

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 16:45:07
* @LastEditTime: 2023-09-28 13:44:14
-->
<template>
<div class="plan-management">
@ -168,24 +168,28 @@
</div>
<my-dialog ref="myDialog" v-on:close="padlock"></my-dialog>
<my-dialogtwo ref="myDialogTwo"></my-dialogtwo>
<temp-dialog ref="tempDialog" v-on:close="padlock"></temp-dialog>
</div>
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue"
import myDialog from "@/views/components/dialog/index.vue"
import myDialogtwo from "@/views/components/dialogTwo/index.vue"
import tempDialog from "@/views/components/tempDialog/index.vue"
import { Loading } from "element-ui";
import { mapState } from "vuex";
export default {
components:{myPagination,myDialog,myDialogtwo},
components:{myPagination,myDialog,myDialogtwo,tempDialog},
data() {
return {
optionsyear:[],
options:[],
myDistrict:[],
form:{
district:[],
plannedYear:''
},
mydistrict:'',
props:{
value:'county',
label:'institutionName',
@ -230,7 +234,7 @@
// planNumb: '200',
// keyCount:10,
// }
],
],
pages:{
pageSize:10,
pageNum:1
@ -247,25 +251,48 @@
computed: {
...mapState({
dept: (state) => state.user.dept,
district: (state) => state.user.district,
}),
},
watch:{
form:{
handler(newForm) {
// console.log(newForm)
// let districtTwo,obj
// if(this.dept.ancestors.split(',').length == 2) {
// districtTwo = district.split(1,8)
// obj = { ...this.pages, ...newForm,district:districtTwo };
// } else if(this.dept.ancestors.split(',').length == 3){
// districtTwo = district.split(1,11)
// obj = { ...this.pages, ...newForm,district:districtTwo };
// }
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj = obj = { ...this.pages, ...newForm };
// district = district[1]
let obj
// console.log(newForm,'newForm')
//
if(!this.disabled) {
if(Array.isArray(newForm.district)){
if(newForm.district.length == 2) {
let district = this.form.district[1].slice(1, 11);
obj = { ...this.pages, ...this.form,district };
} else if(newForm.district.length == 1) {
let district = this.form.district.slice[0](1, 8);
obj = { ...this.pages, ...this.form,district };
}
//
} else {
//
if(this.mydistrict){
let district = this.form.district.slice(1, 11);
obj = { ...this.pages, ...this.form,district };
} else {
obj = this.pages
}
}
} else {
//
// if(this.dept.ancestors.split(',').length == 2) {
// this.subdistrict = this.form.subdistrict.slice(1, 8);
// obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
// } else if(this.dept.ancestors.split(',').length == 3){
let district = this.form.district.slice(1, 11);
obj = { ...this.pages, ...this.form,district };
// }
}
// console.log(obj,'obj')
this.getList(obj)
},
deep:true,
@ -275,7 +302,7 @@
//
componendDistrict(district){
let name
this.options.map((item)=>{
this.myDistrict.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
} else {
@ -290,7 +317,9 @@
},
//
pagesChange(pages){
console.log('123123页码发生变化')
this.getList(pages)
this.pages = pages
},
//
handleSelectionChange(val) {
@ -321,22 +350,23 @@
},
//
reset(){
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj
if(this.dept.parentId !== 0) {
let { district} = this.form;
this.form.plannedYear='';
obj = {...this.pages,district}
} else {
// this.pages.pageNum = 1;
// this.pages.pageSize = 10;
// this.$refs.mypagination.defaultPages();
// let obj
if(this.dept.ancestors.split(',').length == 1) {
this.form = {
plannedYear:'',
district:''
}
obj = this.pages
// obj = this.pages
} else {
let { district} = this.form;
this.form.plannedYear='';
this.form.district=this.mydistrict;
// obj = {...this.pages,district}
}
this.getList(obj)
// this.getList(obj)
},
// dialog
padlock(){
@ -349,20 +379,20 @@
},
//
handleChange(value){
console.log(value)
if(value.length == 2) {
this.form.district = value[1]
} else {
this.form.district = value[0]
}
// console.log(value)
// if(value.length == 2) {
// this.form.district = value[1]
// } else {
// this.form.district = value[0]
// }
},
//
look(row){
this.$refs.myDialogTwo.open(row,this.dept);
this.$refs.tempDialog.open(row,0);
},
//
change(row){
this.$refs.myDialog.open(row,this.dept)
this.$refs.tempDialog.open(row,1)
},
//
deleteItem(row){
@ -416,9 +446,6 @@
this.loading = false;
}
this.tableData = res.data.list;
this.tableData.map((item)=>{
item['planNumb'] = 1
})
this.total = res.data.total
},
commentData(item,dept){
@ -430,31 +457,36 @@
this.commentData(item.children,this.dept)
}
})
this.options = item
this.myDistrict = item;
this.options = item;
if(dept.ancestors.split(',').length == 2) {
this.options = this.options.filter((item)=>{
return item.institutionName == dept.deptName
})
this.options.map((item)=>{
if(item.institutionName == dept.deptName) {
console.log(item.county)
this.form.district = item.county
delete item.children
this.mydistrict = item.county
// delete item.children
}
})
this.disabled = true;
// this.disabled = true;
} else if(dept.ancestors.split(',').length == 3) {
this.options.map((item)=>{
if(item.institutionName == dept.deptName) {
console.log(item.institutionName)
this.form.district = item.subdistrict
this.mydistrict = item.subdistrict
}
})
this.disabled = true;
}
// console.log(this.options)
}
},
async created() {
console.log(this.dept)
// console.log(this.district)
this.checkListTwo = this.checkList;
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables');
@ -464,9 +496,11 @@
// this.main.height = relativeHeight - 80
// console.log(this.main.height)
// })
let data = await this.$api.yingji.tree();
this.commentData(data.data,this.dept)
this.getList(this.pages);
// let data = await this.$api.yingji.tree();
this.commentData(this.district,this.dept)
if(this.dept.ancestors.split(',').length == 1) {
this.getList(this.pages);
}
},
}
</script>

Loading…
Cancel
Save