计划管理增删改查

lijinlong
吕天方 1 year ago
parent 81b8397e47
commit 870d0af21c

@ -1,8 +1,8 @@
###
# @Author: 张涛
# @Date: 2023-07-18 13:04:50
# @LastEditors: 张涛
# @LastEditTime: 2023-08-02 14:15:36
# @LastEditors: JC9527
# @LastEditTime: 2023-09-11 15:36:50
# @FilePath: \Mudu2PC\.env.development
###
# 页面标题
@ -13,7 +13,7 @@ ENV = 'development'
# 苏州应急执法计划管理系统/开发环境
# VUE_APP_BASE_API = 'http://localhost:9028'
VUE_APP_BASE_API = 'http://221.229.220.83:9028'
VUE_APP_BASE_API = 'http://192.168.0.105:9033'
# 路由懒加载

@ -5,4 +5,4 @@ VUE_APP_TITLE = 苏州应急执法计划管理系统
ENV = 'production'
# 苏州应急执法计划管理系统/生产环境
VUE_APP_BASE_API = 'http://221.229.220.83:9028'
VUE_APP_BASE_API = 'http://192.168.0.105:9033'

@ -0,0 +1,5 @@
import yingji from "./yingji/index";
export default {
yingji
}

@ -0,0 +1,52 @@
/*
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527
* @LastEditTime: 2023-09-13 15:04:17
*/
import request from '@/utils/request'
export default {
// 行政区划
tree(params) {
return request({
url: "/pharmaceuticals/administrative/tree",
method: "get",
params,
});
},
// 导入excel
importExcel(data) {
return request({
url: "/pharmaceuticals/bKeyEnterprise/common/importExcel",
method: "post",
data,
});
},
// 企业基本信息
basicList(params) {
return request({
url: "/pharmaceuticals/info/list",
method: "get",
params,
})
},
// 查看,新增,修改,删除计划管理表 get\delete 传参是params put\post 传参是data
bPlanManage(method,data = null, params = null, id){
console.log(id)
return request({
url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ''}`,
method,
data,
params
});
},
bPlanManageTwo(id){
return request({
url: `/pharmaceuticals/bPlanManage/${id}`,
method:'get',
});
},
};

@ -5,7 +5,7 @@ import Cookies from "js-cookie";
import Element from "element-ui";
import "./assets/styles/element-variables.scss";
import "./assets/styles/font.css";
import API from "@/api/index.js";
Element.Dialog.props.closeOnClickModal.default = false; //模态框单击空白处不允许关闭
// 带有斑马纹
@ -79,6 +79,7 @@ Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree;
Vue.prototype.$model = modal;
Vue.prototype.$api = API;
// 全局组件挂载
Vue.component("DictTag", DictTag);

@ -29,17 +29,16 @@
</div>
<div v-if="!nextStep">
<div class="filtrate">
<div class="select-input">
<!-- <div class="select-input">
<div class="select-span">行政区划:</div>
<el-select v-model="form.compartment" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-cascader
v-model="form.compartment"
placeholder="请选择"
:options="optionstwo"
:props="props"
@change="handleChange">
</el-cascader>
</div>
<div class="select-input">
<div class="select-span">企业类型:</div>
@ -52,8 +51,8 @@
>
</el-option>
</el-select>
</div>
<div class="select-input">
</div> -->
<!-- <div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-option
@ -64,8 +63,8 @@
>
</el-option>
</el-select>
</div>
<div class="select-input">
</div> -->
<!-- <div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.industryType" placeholder="请选择">
<el-option
@ -76,10 +75,17 @@
>
</el-option>
</el-select>
</div> -->
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-radio-group v-model="form.isPoint">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</div>
<div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.riskGrade" placeholder="请选择">
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
@ -91,7 +97,7 @@
</div>
<div class="select-input">
<div class="select-span">企业分色:</div>
<el-select v-model="form.frimColor" placeholder="请选择">
<el-select v-model="form.entprColor" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
@ -101,78 +107,89 @@
</el-option>
</el-select>
</div>
<div class="input-input">
<el-input
v-model="form.frimName"
placeholder="请输入企业名称/统一信用代码"
></el-input>
<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 select-btn1">导入</div>
</div>
</div>
<div class="select-btn">搜索</div>
<div class="select-btn select-btn1">导入</div>
</div>
<div class="tables">
<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="id"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
reserve-selection
width="55"
header-align="center"
>
</el-table-column>
<el-table-column
prop="date"
prop="entprName"
label="企业名称"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column
prop="name"
<!-- <el-table-column
prop="subdistrict"
label="行政区划"
show-overflow-tooltip
width="180"
header-align="center"
>
</el-table-column>
</el-table-column> -->
<el-table-column
prop="address"
label="企业类型"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
prop="uscCode"
label="统一社会信用代码"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column prop="is" label="是否重点" header-align="center">
<el-table-column prop="isPoint" label="是否重点" header-align="center">
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
@click="checkBox(scope.row)"
:class="scope.row.is == 1 ? 'isStyle' : ''"
:class="scope.row.isPoint == '1' ? 'isStyle' : ''"
>
<span v-if="scope.row.is == 1"></span>
<span v-if="scope.row.is == 2"></span>
<span v-if="scope.row.isPoint == '1'"></span>
<span v-if="scope.row.isPoint == '0'"></span>
</div>
</template>
</el-table-column>
<el-table-column prop="is" label="选择" header-align="center">
<!-- <el-table-column prop="" label="选择" header-align="center">
<template slot-scope="scope">
<div class="look" @click="chec(scope.row)">
<el-checkbox v-model="scope.row.is"></el-checkbox>
</div>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>
<div class="pagination">
<my-pagination
:total="28"
:total="total"
@pagesChange="pagesChange"
></my-pagination>
</div>
@ -180,7 +197,7 @@
<div v-else class="release-planning">
<div class="inputs centered">
<div class="inputs-span">计划年份:</div>
<el-select v-model="form2.year" placeholder="请选择">
<!-- <el-select v-model="form2.year" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
@ -188,13 +205,22 @@
:value="item.value"
>
</el-option>
</el-select>
</el-select> -->
<el-date-picker
v-model="form2.plannedYear"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年份">
</el-date-picker>
<!-- <img class="data_icon" src="@/assets/images/down2.png" alt=""> -->
</div>
<div class="inputs centered">
<div class="inputs-span">计划标题:</div>
<div class="input">
<el-input
v-model="form2.title"
v-model="form2.planName"
:maxlength="50"
placeholder="请输入计划标题"
></el-input>
@ -204,7 +230,7 @@
<div class="inputs-span">计划内容:</div>
<div class="input">
<el-input
v-model="form2.content"
v-model="form2.planContent"
type="textarea"
resize="none"
placeholder="请输入计划内容"
@ -311,6 +337,11 @@ export default {
},
],
options: [],
optionstwo:[],
props:{
value:'institutionName',
label:'institutionName'
},
multipleSelection: [],
selected: 0,
nextStep: false,
@ -319,57 +350,181 @@ export default {
compartment: "",
frimType: "",
economicsType: "",
industryType: "",
riskGrade: "",
frimColor: "",
frimName: "",
isPoint: "",
majorHazardLevel: "",
entprColor: "",
uscCode: "",
},
form2: {
year: "",
title: "",
content: "",
plannedYear: "",
planName: "",
planContent: "",
remark: "",
},
total:0,
pages:{
pageNum:1,
pageSize:10,
},
loading:false,
isamend:false,
};
},
methods: {
checkBox(e){
filtrate(){
let obj = {...this.pages,...this.form}
this.getTable(obj);
},
open() {
async open(item) {
this.dialogVisible = true;
if(item == 'newlyIncreased') {
this.getTable(this.pages);
} else {
this.isamend = true;
this.getList(item);
this.getTable(this.pages);
}
},
Close() {
Close(item) {
this.dialogVisible = false;
this.isamend = false;
this.nextStep = false;
this.nextText = "下一步";
Object.keys(this.form).forEach(key=>this.form[key]='')
Object.keys(this.form2).forEach(key=>this.form2[key]='')
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.selected = 0;
// this.getTable(this.pages);
if(item == 'newsuccess') {
this.$emit('close')
}
},
//
async getList(item){
let data = await this.$api.yingji.bPlanManageTwo(item.id)
this.selected = data.data.list.length;
let { plannedYear, planName, planContent, remark } = data.data;
this.form2.plannedYear = plannedYear;
this.form2.planName = planName;
this.form2.planContent = planContent;
this.form2.remark = remark;
let arr = data.data.list
this.multipleSelection = data.data.list;
arr.forEach((list)=>{
this.$nextTick(()=>{
this.$refs.multipleTable.toggleRowSelection(list)
})
})
},
// /
async getTable(pages){
this.loading = true;
let data = await this.$api.yingji.basicList(pages);
this.total = data.data.total;
if(data.code == 200) {
this.loading = false;
}
this.tableData = data.data.list;
},
//
pagesChange(pages) {
console.log(pages);
this.getTable(pages);
this.pages = pages;
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
this.selected = this.multipleSelection.length;
// console.log(val)
console.log(this.multipleSelection)
},
//
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;
},
//
next() {
async next() {
if (this.$refs.next.innerText == "下一步") {
this.nextStep = true;
this.nextText = "发布计划";
} else {
console.log(form2);
// console.log('')
// console.log(this.form2);
console.log(this.multipleSelection);
let arr = [];
let arr2 = [];
let keyCount = 0;
this.multipleSelection.map((item)=>{
arr.push(item.subdistrict);
arr2.push(item.uscCode);
if(item.isPoint == '1') {
keyCount++;
}
})
let district = arr.join(',');
let enterpriseId = arr2.join(',');
let createTime = this.getData();
let planNumb = this.multipleSelection.length
let obj = {...this.form2,district,enterpriseId,createTime,keyCount,planNumb}
let data
if(this.isamend) {
data = await this.$api.yingji.bPlanManage('put',obj)
if(data.code == 200){
this.$message({
message: '修改成功',
type: 'success'
});
this.Close('newsuccess');
}
} else {
data = await this.$api.yingji.bPlanManage('post',obj)
if(data.code == 200){
this.$message({
message: '新增成功',
type: 'success'
});
this.Close('newsuccess');
}
}
}
},
//
handleChange(value){
console.log(value)
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "success-row";
}
return "";
},
commentData(item){
if(item instanceof Array) {
item.map((item)=>{
if(item.children instanceof Array && item.children.length == 0){
delete item.children;
} else {
this.commentData(item.children)
}
})
}
this.optionstwo = item
}
},
async mounted(){
let data = await this.$api.yingji.tree();
this.commentData(data.data)
}
};
</script>
<style lang="scss" scoped>
@ -484,6 +639,11 @@ export default {
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
display: flex;
align-items: center;
justify-content: center;
}
// border-radius: 2px;
.el-input
.el-input__suffix
@ -496,12 +656,44 @@ export default {
position: absolute;
width: 10px;
height: 7px;
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
transform: rotate(180deg);
}
}
::v-deep .el-cascader {
background-color: transparent;
width: 180px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-down::before {
content: "";
background: url(../../../assets/images/down2.png) center center
no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
.bottom {
display: flex;
justify-content: space-between;
width: 100%;
.btns {
display: flex;
}
}
.input-input {
margin: 20px 40px 0 0;
width: 250px;
@ -528,6 +720,7 @@ export default {
}
.select-btn1 {
background: #28b384;
margin-left: 40px;
}
}
.tables {
@ -588,21 +781,6 @@ export default {
height: 33px;
}
// border-radius: 2px;
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-up::before {
content: "";
background: url(../../../assets/images/down2.png) center center
no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.input {
flex: 1;
@ -616,6 +794,21 @@ export default {
}
.centered {
align-items: center;
// position: relative;
// .data_icon {
// width: 10px;
// height: 7px;
// position: absolute;
// top: 50%;
// left: 280px;
// z-index: 9;
// color: #c0c4cc;
// font-size: 14px;
// transform: translateY(-50%);
// }
// ::v-deep .el-input__prefix {
// display: none;
// }
}
}
.next {

@ -0,0 +1,286 @@
<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="70%"
>
<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></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="id"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
reserve-selection
width="55"
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="180"
header-align="center"
>
</el-table-column> -->
<el-table-column
prop="address"
label="企业类型"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column
prop="uscCode"
label="统一社会信用代码"
show-overflow-tooltip
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 == '0'"></span>
</div>
</template>
</el-table-column>
<!-- <el-table-column prop="" label="选择" header-align="center">
<template slot-scope="scope">
<div class="look" @click="chec(scope.row)">
<el-checkbox v-model="scope.row.is"></el-checkbox>
</div>
</template>
</el-table-column> -->
</el-table>
</div>
<div class="pagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
></my-pagination>
</div>
</div>
</el-dialog>
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue";
export default {
components: { myPagination },
data() {
return {
dialogVisible: false,
tableData: [
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-08",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 2,
},
{
date: "2016-05-06",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 2,
},
{
date: "2016-05-07",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-08",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-06",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-07",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
],
multipleSelection: [],
total:0,
pages:{
pageNum:1,
pageSize:10,
},
loading:false,
};
},
methods: {
async open() {
this.dialogVisible = true;
},
Close() {
this.dialogVisible = false;
this.pages.pageNum = 1;
this.pages.pageSize = 10;
},
//
pagesChange(pages) {
this.getTable(pages);
this.pages = pages;
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "success-row";
}
return "";
},
},
};
</script>
<style lang="scss" scoped>
.isStyle {
color: #f71052;
}
.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;
.tables {
background-color: #eaf2fd;
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);
}
td {
height: 30px;
text-align: center;
font-size: 15px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
th {
height: 30px;
background-color: #eaf2fd;
font-size: 16px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #525966;
.el-checkbox {
display: none;
}
}
.el-table__body-wrapper {
height: 448px !important;
overflow-y: auto;
}
}
::v-deep .el-table::before {
height: 0;
}
}
.pagination {
margin-top: 10px;
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>

@ -12,9 +12,9 @@
>{{ total }}显示{{
total == 0
? "0"
: current == 1
: pageNum == 1
? "1"
: size * (current - 1) + 1
: pageSize * (pageNum - 1) + 1
}}-{{ numberMap() }}</span
>
<el-pagination
@ -25,8 +25,8 @@
layout=" prev, pager, next, sizes, jumper"
@current-change="currentChange"
@size-change="sizeChange"
:current-page.sync="current"
:page-size.sync="size"
:current-page.sync="pageNum"
:page-size.sync="pageSize"
>
</el-pagination>
</div>
@ -35,8 +35,8 @@
export default {
data() {
return {
current:1,
size:10,
pageNum:1,
pageSize:10,
}
},
props:{
@ -47,14 +47,14 @@ export default {
},
methods:{
currentChange(e) {
this.current = e;
this.$emit('pagesChange',{size:this.size,current:e})
this.pageNum = e;
this.$emit('pagesChange',{pageSize:this.pageSize,pageNum:e})
},
//
sizeChange(e) {
this.size = e;
this.current = 1;
this.$emit('pagesChange',{size:e,current:this.current})
this.pageSize = e;
this.pageNum = 1;
this.$emit('pagesChange',{pageSize:e,pageNum:this.pageNum})
},
//
numberMap() {

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-06 11:07:37
* @LastEditTime: 2023-09-11 16:42:05
-->
<template>
<div class="container-main" ref="main">
@ -14,7 +14,7 @@
<div class="select-span">年份:</div>
<el-select v-model="form.year" placeholder="请选择">
<el-option
v-for="item in options"
v-for="item in optionsyear"
:key="item.value"
:label="item.label"
:value="item.value">
@ -23,14 +23,20 @@
</div>
<div class="select-input">
<div class="select-span">区划:</div>
<el-select v-model="form.compartment" placeholder="请选择">
<!-- <el-select v-model="form.compartment" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-select> -->
<el-cascader
v-model="form.compartment"
placeholder="请选择"
:options="options"
:props="props"
@change="handleChange"></el-cascader>
</div>
<div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect">
@ -169,6 +175,11 @@
state:'已执法'
}],
options:[],
optionsyear:[],
props:{
value:'institutionName',
label:'institutionName'
},
form:{
year:'',
compartment:'',
@ -198,6 +209,10 @@
this.checkList = this.checkListTwo
}
},
//
handleChange(value){
console.log(value)
},
changeList(){
console.log(this.checkList[0]) //
},
@ -226,8 +241,20 @@
exportFile(){
// console.log(this.multipleSelection)
},
commentData(item){
if(item instanceof Array) {
item.map((item)=>{
if(item.children instanceof Array && item.children.length == 0){
delete item.children;
} else {
this.commentData(item.children)
}
})
}
this.options = item
}
},
mounted() {
async mounted() {
this.checkListTwo = this.checkList;
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables');
@ -236,6 +263,8 @@
// let relativeHeight = windowHeight - height.top
// this.main.height = relativeHeight - 80
// })
let data = await this.$api.yingji.tree();
this.commentData(data.data)
},
};
</script>
@ -272,12 +301,41 @@
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
display: flex;
align-items: center;
justify-content: center;
}
// border-radius: 2px;
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
content: "";
background: url(../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
// position: absolute;
// top: 0;
// left: 50%;
// margin-left: -5px;
transform: rotate(180deg);
}
}
::v-deep .el-cascader {
background-color: transparent;
width: 276px;
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-down::before {
content: "";
background: url(../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-06 11:07:37
* @LastEditTime: 2023-09-11 16:47:11
-->
<template>
<div class="container-main" ref="main">
@ -256,6 +256,11 @@ export default {
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
display: flex;
align-items: center;
justify-content: center;
}
// border-radius: 2px;
.el-input
.el-input__suffix
@ -268,9 +273,10 @@ export default {
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
transform: rotate(180deg);
}
}
}

@ -219,6 +219,11 @@ export default {
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
display: flex;
align-items: center;
justify-content: center;
}
// border-radius: 2px;
.el-input
.el-input__suffix
@ -230,9 +235,10 @@ export default {
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
transform: rotate(180deg);
}
}
}

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-06 15:59:41
* @LastEditTime: 2023-09-13 16:13:34
-->
<template>
<div class="plan-management">
@ -12,25 +12,42 @@
<div class="drup-downs">
<div class="year">
<div class="year-span">年份:</div>
<el-select v-model="value" placeholder="请选择">
<!-- <el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
v-for="item in optionsyear"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-select> -->
<el-date-picker
v-model="form.plannedYear"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年份">
</el-date-picker>
</div>
<div class="area">
<div class="area-span">区划:</div>
<el-select v-model="value2" placeholder="请选择">
<!-- <el-select v-model="value2" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-select> -->
<!-- <div class="block">
<span class="demonstration">默认 click 触发子菜单</span> -->
<el-cascader
v-model="form.district"
placeholder="请选择"
:options="options"
:props="props"
@change="handleChange"></el-cascader>
<!-- </div> -->
</div>
</div>
<div class="btns">
@ -50,6 +67,8 @@
:data="tableData"
:border="false"
:height="484"
v-loading="loading"
tooltip-effect="light"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
>
@ -60,33 +79,41 @@
>
</el-table-column>
<el-table-column
prop="date"
prop="plannedYear"
label="计划年份"
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="name"
prop="district"
label="行政区划"
show-overflow-tooltip
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
prop="planNumb"
label="计划企业数量"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
prop="keyCount"
label="省重点数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
header-align="center"
>
</el-table-column>
<el-table-column
label="操作"
width="250"
header-align="center"
>
<template slot-scope="scope">
@ -109,87 +136,54 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="28" @pagesChange="pagesChange"></my-pagination>
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
</div>
</div>
<my-dialog ref="myDialog"></my-dialog>
<my-dialog ref="myDialog" v-on:close="padlock"></my-dialog>
<my-dialogtwo ref="myDialogTwo"></my-dialogtwo>
</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"
export default {
components:{myPagination,myDialog},
components:{myPagination,myDialog,myDialogtwo},
data() {
return {
optionsyear:[],
options:[
],
form:{
district:'',
plannedYear:''
},
props:{
value:'institutionName',
label:'institutionName'
},
value:'2022',
value2:'苏州',
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
tableData: [],
multipleSelection: [],
pages:{
pageSize:10,
pageNum:1
},
total:0,
loading:false,
}
},
methods:{
//
pagesChange(pages){
console.log(pages)
// console.log(pages)
this.getList(pages)
},
//
handleSelectionChange(val) {
//
this.multipleSelection = val;
},
//
@ -198,30 +192,48 @@
},
//
newProject(){
this.$refs.myDialog.open()
this.$refs.myDialog.open('newlyIncreased')
},
// dialog
padlock(){
this.getList(this.pages);
},
//
handleChange(value){
console.log(value)
},
//
look(row){
this.$refs.myDialogTwo.open(row);
},
//
change(row){
this.$refs.myDialog.open(row)
},
//
deleteItem(row){
this.$modal.confirm("你确认要删除所选数据吗?", "提示", {
let idList = [];
idList.push(row.id)
this.$modal.confirm("你确认要删除该条数据吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
// this.$api.overview.delete(row.id).then((response) => {
// console.log(response);
// });
// this.getList();
console.log(row)
console.log('确定删除')
.then(async() => {
this.loading = true;
try {
let data = await this.$api.yingji.bPlanManage('delete',_,{idList:idList.join(',')})
if(data.code == 200) {
this.loading = false;
this.$message({
message: '删除成功',
type: 'success'
});
this.getList();
}
} catch (error) {
console.log(error)
}
})
.catch(() => {
console.log('取消删除')
@ -233,8 +245,31 @@
}
return '';
},
// list
async getList(pages){
this.loading = true;
let res = await this.$api.yingji.bPlanManage('get',_,pages);
console.log(res);
if(res.code == 200) {
this.loading = false;
}
this.tableData = res.data.list;
this.total = res.data.total
},
commentData(item){
if(item instanceof Array) {
item.map((item)=>{
if(item.children instanceof Array && item.children.length == 0){
delete item.children;
} else {
this.commentData(item.children)
}
})
}
this.options = item
}
},
created() {
async created() {
this.checkListTwo = this.checkList;
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables');
@ -244,6 +279,9 @@
// this.main.height = relativeHeight - 80
// console.log(this.main.height)
// })
let data = await this.$api.yingji.tree();
this.commentData(data.data)
this.getList(this.pages);
},
}
</script>
@ -284,6 +322,24 @@
line-height: 40px;
margin-right: 10px;
}
::v-deep .el-cascader {
background-color: transparent;
width: 276px;
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-down::before {
content: "";
background: url(../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
::v-deep .el-select {
background-color: transparent;
@ -291,6 +347,11 @@
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
display: flex;
align-items: center;
justify-content: center;
}
// border-radius: 2px;
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
content: "";
@ -299,9 +360,10 @@
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
transform: rotate(180deg);
}
}
}

@ -42,7 +42,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.117:9028`,
target: `http://192.168.0.113:9033`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save