@@ -296,6 +288,7 @@ export default {
listThree: [],
listFour: [],
listFive: [],
+ options:[],
props: {
value: "county",
label: "institutionName",
@@ -322,6 +315,17 @@ export default {
planContent: "",
remark: "",
},
+ rules: {
+ plannedYear: [
+ { required: true, message: '请选择年月', trigger: 'blur' },
+ ],
+ planName: [
+ { required: true, message: '请输入计划标题', trigger: 'blur' }
+ ],
+ planContent: [
+ { required: true, message: '请输入计划内容', trigger: 'blur' }
+ ]
+ },
total: 0,
pages: {
pageNum: 1,
@@ -330,9 +334,9 @@ export default {
loading: false,
isamend: false,
amendId: "",
- count: 0,
- unCount: 0,
- unselected: 0,
+ // count: 0,
+ // unCount: 0,
+ // unselected: 0,
selectList: [],
disabled:false,
};
@@ -355,7 +359,7 @@ export default {
if(this.form.subdistrict.length > 0){
if(this.form.subdistrict.length == 2) {
this.form.subdistrict = this.form.subdistrict[1]
- this.subdistrict = this.form.subdistrict.slice(0, 10);
+ this.subdistrict = this.form.subdistrict.slice(0, 11);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else if(this.form.subdistrict.length == 1) {
this.form.subdistrict = this.form.subdistrict[0]
@@ -371,7 +375,7 @@ export default {
this.subdistrict = this.form.subdistrict.slice(0, 7);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
} else if(this.dept.parentId == 101){
- this.subdistrict = this.form.subdistrict.slice(0, 10);
+ this.subdistrict = this.form.subdistrict.slice(0, 11);
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
}
}
@@ -440,8 +444,15 @@ export default {
this.commentData(data.data,dept);
this.filtrate()
if (item == "newlyIncreased") {
- // if (this.dept.deptName !== "市局") {
- // this.bPlanEnterprise();
+ // 判断如若是镇级即将所有重点企业全选
+ // if(dept.parentId == 101){
+ // this.tableData.map((item)=>{
+ // if(item.isPoint == 1) {
+ // this.$nextTick(() => {
+ // this.$refs.multipleTable.toggleRowSelection(item);
+ // });
+ // }
+ // })
// }
// this.getTable(this.pages);
} else {
@@ -461,12 +472,12 @@ export default {
this.nextText = "下一步";
Object.keys(this.form).forEach((key) => (this.form[key] = ""));
Object.keys(this.form2).forEach((key) => (this.form2[key] = ""));
- this.unCount = 0;
+ // this.unCount = 0;
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.selected = 0;
- this.unselected = 0;
- this.count = 0;
+ // this.unselected = 0;
+ // this.count = 0;
if (item == "newsuccess") {
this.$emit("close");
}
@@ -494,12 +505,12 @@ export default {
let data = await this.$api.yingji.basicList(pages);
// console.log(data.data.count, '重点企业总数');
// console.log(this.unCount,'this.unCount')
- this.count = data.data.count;
- data.data.count == this.unselected
- ? (this.unCount = data.data.count)
- : this.unselected == 0
- ? (this.unCount = 0)
- : (this.unCount = data.data.count - this.unselected);
+ // this.count = data.data.count;
+ // data.data.count == this.unselected
+ // ? (this.unCount = data.data.count)
+ // : this.unselected == 0
+ // ? (this.unCount = 0)
+ // : (this.unCount = data.data.count - this.unselected);
this.total = data.data.total;
// console.log(this.unselected,'this.unselected')
if (data.code == 200) {
@@ -535,7 +546,7 @@ export default {
let arr2 = [];
let keyCount = 0;
this.multipleSelection.map((item) => {
- arr.push(item.subdistrict);
+ arr.push('0' + item.subdistrict);
arr2.push(item.uscCode);
if (item.isPoint == "1") {
keyCount++;
@@ -546,84 +557,69 @@ export default {
this.$message.error("请至少选择一家企业");
return;
}
- if (this.dept.parentId == 101) {
- if (this.count == this.unselected + keyCount) {
- this.nextStep = true;
- this.nextText = "发布计划";
- } else {
- this.$message.error("请将重点企业全选");
- }
- } else {
+ // if (this.dept.parentId == 101) {
+ // if (this.count == this.unselected + keyCount) {
+ // this.nextStep = true;
+ // this.nextText = "发布计划";
+ // } else {
+ // this.$message.error("请将重点企业全选");
+ // }
+ // }
+ else {
this.nextStep = true;
this.nextText = "发布计划";
}
} else {
- let downloadLoadingInstance = Loading.service({
- text: this.isamend ? "正在修改计划,请稍后" : "正在发布计划,请稍后",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
- // console.log(this.form2);
- // console.log(this.multipleSelection);
-
- let district = arr.join(",");
- let enterpriseId = arr2.join(",");
- let createTime = this.getData();
- let planNumb = this.multipleSelection.length;
- let obj = {
- ...this.form2,
- district,
- enterpriseId,
- createTime,
- planNumb,
- };
- let data;
- if (this.isamend) {
- obj = { ...obj, id: this.amendId };
- if (
- this.form2.plannedYear != "" &&
- this.form2.planName != "" &&
- this.form2.planContent != ""
- ) {
- data = await this.$api.yingji.bPlanManage("put", obj);
- if (data.code == 200) {
- downloadLoadingInstance.close();
- this.$message({
- message: "修改成功",
- type: "success",
- });
- this.Close("newsuccess");
- }
- } else {
- downloadLoadingInstance.close();
- this.$message({
- message: "年份、计划标题、计划内容、都不能为空",
- type: "error",
+ this.$refs.form.validate(async (valid) => {
+ if (valid) {
+ let downloadLoadingInstance = Loading.service({
+ text: this.isamend ? "正在修改计划,请稍后" : "正在发布计划,请稍后",
+ spinner: "el-icon-loading",
+ background: "rgba(0, 0, 0, 0.7)",
});
- }
- } else {
- if (
- this.form2.plannedYear != "" &&
- this.form2.planName != "" &&
- this.form2.planContent != ""
- ) {
- data = await this.$api.yingji.bPlanEnterprise("post", obj);
- if (data.code == 200) {
- downloadLoadingInstance.close();
- this.$message({
- message: "新增成功",
- type: "success",
- });
- this.Close("newsuccess");
+ // console.log(this.form2);
+ // console.log(this.multipleSelection);
+
+ let district = arr.join(",");
+ let enterpriseId = arr2.join(",");
+ let createTime = this.getData();
+ let planNumb = this.multipleSelection.length;
+ let obj = {
+ ...this.form2,
+ district,
+ enterpriseId,
+ createTime,
+ planNumb,
+ };
+ let data;
+
+ if (this.isamend) {
+ obj = { ...obj, id: this.amendId };
+ data = await this.$api.yingji.bPlanManage("put", obj);
+ if (data.code == 200) {
+ downloadLoadingInstance.close();
+ this.$message({
+ message: "修改成功",
+ type: "success",
+ });
+ this.Close("newsuccess");
+ }
+ } else {
+ data = await this.$api.yingji.bPlanEnterprise("post", obj);
+ if (data.code == 200) {
+ downloadLoadingInstance.close();
+ this.$message({
+ message: "新增成功",
+ type: "success",
+ });
+ this.Close("newsuccess");
+ }
}
} else {
- downloadLoadingInstance.close();
- this.$message({
- message: "年份、计划标题、计划内容、都不能为空",
- type: "error",
- });
+ // console.log('error submit!!');
+ return false;
}
- }
+ });
}
},
// 区划级联选择器选择触发
@@ -795,7 +791,7 @@ export default {
}
::v-deep .el-select {
background-color: transparent;
- width: 180px;
+ width: 160px;
.el-input__inner {
height: 33px;
}
@@ -939,7 +935,41 @@ export default {
}
}
.release-planning {
- padding: 0 10px 0 0;
+ padding: 10px 10px 0 0;
+ .form-inline {
+ ::v-deep .el-select {
+ background-color: transparent;
+ width: 190px;
+ .el-input__inner {
+ height: 33px;
+ font-size: 15px;
+ font-family: 'Alibaba PuHuiTi';
+ font-weight: 400;
+ color: #525966;
+ }
+ // border-radius: 2px;
+ }
+ ::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;
+ }
+ }
+ }
+ }
.inputs {
display: flex;
margin-top: 20px;
diff --git a/src/views/components/dialogInfo/index.vue b/src/views/components/dialogInfo/index.vue
new file mode 100644
index 0000000..0e3a7b2
--- /dev/null
+++ b/src/views/components/dialogInfo/index.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+

+
+
+
+
+
+
+ {{
+ item.value == "null"
+ ? ""
+ : item.value == "false"
+ ? "暂无"
+ : item.value
+ }}
+
+
+
+
+
+
+
+
diff --git a/src/views/yingji/planManage.vue b/src/views/yingji/planManage.vue
index dcbc02d..09218ae 100644
--- a/src/views/yingji/planManage.vue
+++ b/src/views/yingji/planManage.vue
@@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
- * @LastEditTime: 2023-09-26 13:14:38
+ * @LastEditTime: 2023-09-26 16:02:57
-->
@@ -12,14 +12,6 @@
-
+
新增计划
@@ -199,35 +191,34 @@
id: 1,
plannedYear: '2016-05-02',
district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1518 弄'
- }, {
- id: 2,
- plannedYear: '2016-05-04',
- district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1517 弄'
- }, {
- id: 3,
- plannedYear: '2016-05-01',
- district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1519 弄',
+ planNumb: '200',
children: [{
id: 31,
plannedYear: '2016-05-01',
district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1519 弄'
+ planNumb: '200'
}, {
id: 32,
plannedYear: '2016-05-01',
district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1519 弄'
+ planNumb: '200'
}]
}, {
- id: 4,
+ id: 2,
+ plannedYear: '2016-05-04',
+ district: '王小虎',
+ planNumb: '200'
+ }, {
+ id: 256,
+ plannedYear: '2016-05-01',
+ district: '王小虎',
+ planNumb: '200',
+ }, {
+ id: 257,
plannedYear: '2016-05-03',
district: '王小虎',
- planNumb: '上海市普陀区金沙江路 1516 弄'
+ planNumb: '200'
}],
- // multipleSelection: [],
pages:{
pageSize:10,
pageNum:1
@@ -261,7 +252,6 @@
methods:{
// 页码,当前页切换事件
pagesChange(pages){
- // console.log(pages)
this.getList(pages)
},
// 选中的数据
@@ -378,7 +368,6 @@
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;
}
@@ -391,7 +380,6 @@
item.county = item.subdistrict
delete item.children;
} else {
- // this.props.value = 'subdistrict'
this.commentData(item.children,this.dept)
}
})
@@ -473,7 +461,7 @@
font-weight: bold;
color: #525966;
line-height: 40px;
- // margin-right: 10px;
+ margin-right: 100px;
}
::v-deep .el-cascader {
background-color: transparent;
diff --git a/vue.config.js b/vue.config.js
index 27ef35c..47be370 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -49,8 +49,8 @@ module.exports = {
// },
// },
'/api': {
- target: `http://39.101.188.84:9033`,
- // target: `http://192.168.0.119:9033`,
+ // target: `http://39.101.188.84:9033`,
+ target: `http://192.168.0.119:9033`,
changeOrigin: true,
pathRewrite: {
'^/api': ''