| | |
| | | </el-form> |
| | | <el-tabs v-model="activeName" class="demo-tabs"> |
| | | <el-tab-pane label="目标指标分解" name="1"> |
| | | <el-button type="primary" size="default" @click="daiAdd" :disabled="disabled">新增</el-button> |
| | | <el-button type="primary" size="default" @click="daiAdd('新增')" :disabled="disabled">新增</el-button> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-table :data="formUp.targetDivideDetailList" style="width: 100%"> |
| | | <el-table-column align="center" property="dutyDepartmentId" label="责任部门" width="180" /> |
| | | <el-table-column align="center" property="value" label="考核指标" width="180" /> |
| | | <el-table-column align="center" property="makerDepartmentId" label="制定人部门" /> |
| | | <el-table-column align="center" property="makeDate" :formatter="timeDate(makeDate)" label="制定日期" /> |
| | | <el-table-column align="center" property="commitPersonId" label="上报人" /> |
| | | <el-table-column align="center" property="makeDate" label="制定日期" :formatter="timeDate"/> |
| | | <el-table-column align="center" property="commitPersonName" label="上报人" /> |
| | | <el-table-column align="center" property="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="daiAdd('查看', scope.row)">查看</el-button> |
| | |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent, ref, reactive } from 'vue'; |
| | | import {timeDate} from '/@/assets/index.ts' |
| | | import { Search, FullScreen } from '@element-plus/icons-vue'; |
| | | import DailogAdd from './DailogAdd.vue'; |
| | | import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext } from 'element-plus'; |
| | |
| | | import { goalManagementApi } from '/@/api/goalManagement'; |
| | | import { emit } from 'process'; |
| | | export default defineComponent({ |
| | | components: { DailogAdd, DailogSearch }, |
| | | components: { DailogAdd, DailogSearch}, |
| | | setup(props,{emit}) { |
| | | const dialogVisible = ref<boolean>(false); |
| | | const form = ref({ |
| | |
| | | // 表格 |
| | | const tableData = ref([]); |
| | | // 新增弹窗 |
| | | const index=ref<any>() |
| | | const Show = ref(); |
| | | const daiAdd = (title: string, data: any) => { |
| | | console.log(data); |
| | | index.value = formUp.targetDivideDetailList.indexOf(data); |
| | | Show.value.openDailog(title, data); |
| | | }; |
| | | const formUp = reactive({ |
| | |
| | | targetDivideDetailList: [], //目标指标分解列表 |
| | | }); |
| | | const add = (val: any) => { |
| | | formUp.targetDivideDetailList.push(val); |
| | | if(index.value==-1){ |
| | | formUp.targetDivideDetailList.push(val); |
| | | }else{ |
| | | formUp.targetDivideDetailList[index.value] = val; |
| | | } |
| | | |
| | | // let obj=JSON.parse(JSON.stringify(form.value)) |
| | | }; |
| | | // 新增 |
| | |
| | | } |
| | | }; |
| | | // 时间格式处理 |
| | | const timeDate = (data: any) => { |
| | | console.log('xxxxxxxxxxx',data) |
| | | let result = new Date(data).getTime(); |
| | | return result; |
| | | }; |
| | | // const timeDate = (data: any) => { |
| | | // let result = new Date(data).getTime(); |
| | | // return result; |
| | | // }; |
| | | return { |
| | | arr, |
| | | index, |
| | | timeDate, |
| | | arr, |
| | | form, |
| | | dialogVisible, |
| | | openDailog, |