修改计划详情的样式

lijinlong^2
吕天方 1 year ago
parent dcc9244146
commit fbcc5037ec

@ -4,7 +4,7 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2023-09-28 11:25:48 * @Date: 2023-09-28 11:25:48
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2023-09-30 14:01:06 * @LastEditTime: 2023-10-01 01:22:07
--> -->
<template> <template>
<el-dialog <el-dialog
@ -24,54 +24,66 @@
</div> </div>
<img src="@/assets/images/close.png" alt="" @click="Close" /> <img src="@/assets/images/close.png" alt="" @click="Close" />
</div> </div>
<el-form ref="form" label-width="80px" v-loading="loading"> <div v-loading="loading">
<el-form-item label="企业名称:" class="form-input"> <el-form ref="form" label-width="80px" v-if="id == 1">
<el-input v-model="form.entprName" :readonly="true"></el-input> <el-form-item label="企业名称:" class="form-input">
</el-form-item> <el-input v-model="form.entprName" :readonly="true"></el-input>
<el-form-item label="行政区划:" class="form-input"> </el-form-item>
<el-input v-model="form.district" :readonly="true"></el-input> <el-form-item label="行政区划:" class="form-input">
</el-form-item> <el-input v-model="form.district" :readonly="true"></el-input>
<el-form-item label="发布时间:" class="form-input"> </el-form-item>
<el-input v-model="form.createTime" :readonly="true"></el-input> <el-form-item label="发布时间:" class="form-input">
</el-form-item> <el-input v-model="form.createTime" :readonly="true"></el-input>
<el-form-item label="计划年月:" class="form-input"> </el-form-item>
<!-- <el-input v-model="form.plannedYear" :readonly="true"></el-input> --> <el-form-item label="计划年月:" class="form-input">
<el-date-picker <!-- <el-input v-model="form.plannedYear" :readonly="true"></el-input> -->
v-model="form.plannedYear" <el-date-picker
type="month" v-model="form.plannedYear"
format="yyyy-MM" type="month"
:clearable="false" format="yyyy-MM"
:disabled="readonly" :clearable="false"
value-format="yyyy-MM" :disabled="readonly"
placeholder="请选择年月"> value-format="yyyy-MM"
</el-date-picker> placeholder="请选择年月">
</el-form-item> </el-date-picker>
<el-form-item label="计划标题:"> </el-form-item>
<el-input v-model="form.planName" :readonly="readonly"></el-input> <el-form-item label="计划标题:">
</el-form-item> <el-input v-model="form.planName" :readonly="readonly"></el-input>
<el-form-item label="计划内容:" class="form-textarea"> </el-form-item>
<el-input <el-form-item label="计划内容:" class="form-textarea">
v-model="form.planContent" <el-input
type="textarea" v-model="form.planContent"
resize="none" type="textarea"
:readonly="readonly" resize="none"
placeholder="请输入计划内容" :readonly="readonly"
></el-input> placeholder="请输入计划内容"
</el-form-item> ></el-input>
<el-form-item label="备注:" class="form-textarea"> </el-form-item>
<el-input <el-form-item label="备注:" class="form-textarea">
v-model="form.remark" <el-input
type="textarea" v-model="form.remark"
resize="none" type="textarea"
:readonly="readonly" resize="none"
placeholder="请输入备注" :readonly="readonly"
></el-input> placeholder="请输入备注"
</el-form-item> ></el-input>
<el-form-item class="btns"> </el-form-item>
<el-button type="primary" @click="onSubmit" v-if="!readonly"></el-button> <el-form-item class="btns">
<el-button @click="Close"></el-button> <el-button type="primary" @click="onSubmit" v-if="!readonly"></el-button>
</el-form-item> <el-button @click="Close"></el-button>
</el-form> </el-form-item>
</el-form>
<el-descriptions :column="2" border v-else>
<el-descriptions-item
:label="item.label"
v-for="(item, index) in listDes"
:key="index"
:span="item.span ? item.span : 1"
>
{{ item.value}}
</el-descriptions-item>
</el-descriptions>
</div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -95,7 +107,41 @@ export default {
id:'', id:'',
readonly:false, readonly:false,
loading:true, loading:true,
title:'查看详情' title:'查看详情',
listDes:[
{
tag:'entprName',
label:'企业名称',
value:'',
},{
tag:'district',
label:'行政区划',
value:'',
},{
tag:'createTime',
label:'发布时间',
value:'',
},{
tag:'plannedYear',
label:'计划年月',
value:'',
},{
tag:'planName',
label:'计划标题',
value:'',
span:2,
},{
tag:'planContent',
label:'计划内容',
value:'',
span:2,
},{
tag:'remark',
label:'备注',
value:'',
span:2,
},
]
} }
}, },
computed: { computed: {
@ -107,7 +153,7 @@ export default {
open(item,id) { open(item,id) {
console.log(item) console.log(item)
this.id = item.id this.id = item.id
this.getMyData(item.id) this.getMyData(item.id,id)
if(id == 0) { if(id == 0) {
this.readonly = true; this.readonly = true;
this.title = '查看详情' this.title = '查看详情'
@ -117,20 +163,47 @@ export default {
} }
this.dialogVisible = true; this.dialogVisible = true;
}, },
async getMyData(id){ async getMyData(id,idTwo){
// console.log(id)
// console.log(data)
this.loading = true; this.loading = true;
let data = await this.$api.yingji.bPlanManageTwo(id) let data = await this.$api.yingji.bPlanManageTwo(id)
if(data.code == 200){ if(data.code == 200){
let { entprName,district,createTime,plannedYear,planName,planContent,remark } = data.data let { entprName,district,createTime,plannedYear,planName,planContent,remark } = data.data
// let listData = data.data
this.mydistrict = district this.mydistrict = district
let myDistrict = this.componendDistrict(district) let myDistrict = this.componendDistrict(district)
let mycreateTime = createTime.split(' ')[0] let mycreateTime = createTime.split(' ')[0]
this.form = { entprName,district:myDistrict,createTime:mycreateTime,plannedYear,planName,planContent,remark } if(idTwo == 2) {
let obj = { entprName,myDistrict,mycreateTime,plannedYear,planName,planContent,remark }
this.changeDescriptions(this.listDes,...Object.values(obj))
// for(let key in listData){
// this.listDes.forEach((value1, index1) => {
// if (key == value1.tag) {
// this.listDes[index1].value = listData[key];
// return;
// }
// });
// }
// this.listDes.forEach((value1, index1) => {
// //
// if (value1.tag == "district") {
// this.listDes[index1].value = myDistrict;
// }
// //
// if (value1.tag == "createTime") {
// this.listDes[index1].value = mycreateTime;
// }
// })
} else {
this.form = { entprName,district:myDistrict,createTime:mycreateTime,plannedYear,planName,planContent,remark }
}
this.loading = false; this.loading = false;
} }
}, },
changeDescriptions(arr,...items){
items.map((item,index)=>{
arr[index].value = item || '/'
})
},
Close(item) { Close(item) {
this.dialogVisible = false; this.dialogVisible = false;
Object.keys(this.form).forEach((key) => (this.form[key] = "")); Object.keys(this.form).forEach((key) => (this.form[key] = ""));
@ -205,6 +278,18 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <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 { .dialog-slot {
.closeClick { .closeClick {
position: absolute; position: absolute;

@ -4,14 +4,14 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2023-09-04 10:20:06 * @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2023-09-27 16:47:17 * @LastEditTime: 2023-10-01 00:42:43
--> -->
<template> <template>
<div class="container-main" ref="main"> <div class="container-main" ref="main">
<div class="enforce-the-law-title"> <div class="enforce-the-law-title">
<div class="filtrate-condition"> <div class="filtrate-condition">
<div class="select-input"> <div class="select-input">
<div class="select-span">:</div> <div class="select-span">:</div>
<el-date-picker <el-date-picker
v-model="form.plannedYear" v-model="form.plannedYear"
type="month" type="month"

@ -4,7 +4,7 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2023-09-04 10:20:06 * @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2023-09-30 15:59:35 * @LastEditTime: 2023-10-01 00:57:43
--> -->
<template> <template>
<div class="plan-management"> <div class="plan-management">
@ -262,7 +262,7 @@
this.pages.pageSize = 10; this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages(); this.$refs.mypagination.defaultPages();
let obj let obj
console.log(newForm,'newForm') // console.log(newForm,'newForm')
// //
if(!this.disabled) { if(!this.disabled) {
if(Array.isArray(newForm.district)){ if(Array.isArray(newForm.district)){
@ -297,7 +297,7 @@
obj = { ...this.pages, ...this.form,district }; obj = { ...this.pages, ...this.form,district };
// } // }
} }
console.log(obj,'obj') // console.log(obj,'obj')
this.getList(obj) this.getList(obj)
}, },
deep:true, deep:true,
@ -324,7 +324,7 @@
}, },
// //
pagesChange(pages){ pagesChange(pages){
console.log('123123页码发生变化') // console.log('123123')
this.getList(pages) this.getList(pages)
this.pages = pages this.pages = pages
}, },
@ -455,7 +455,7 @@
}, },
// //
look(row){ look(row){
this.$refs.tempDialog.open(row,0); this.$refs.tempDialog.open(row,2);
}, },
// //
change(row){ change(row){
@ -579,9 +579,9 @@
} }
}, },
async created() { async created() {
console.log(this.dept) // console.log(this.dept)
this.myDistrict = this.district; this.myDistrict = this.district;
console.log(this.myDistrict) // console.log(this.myDistrict)
// this.checkListTwo = this.checkList; // this.checkListTwo = this.checkList;
// this.$nextTick(()=>{ // this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables'); // let dom = document.getElementsByClassName('tables');

Loading…
Cancel
Save