| | |
| | | </el-form> |
| | | <el-tabs v-model="activeName" class="demo-tabs"> |
| | | <el-tab-pane label="目标指标分解" name="1"> |
| | | <el-button type="primary" size="default" @click="daiAdd('新增', '')">新增</el-button> |
| | | <el-button type="primary" size="default" @click="daiAdd('新增','')">新增</el-button> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-table :data="form.examineItemList" style="width: 100%"> |
| | |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="daiAdd('查看', scope.row)">查看</el-button> |
| | | <el-button link type="primary" @click="daiAdd('修改', scope.row)">修改</el-button> |
| | | <el-button link type="primary" @click="deleteA(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }; |
| | | // 接受传值 |
| | | const AddObj = (val: any) => { |
| | | form.value.examineItemList.push(val); |
| | | if (index.value == -1) { |
| | | form.value.examineItemList.push(val); |
| | | } else { |
| | | form.value.examineItemList[index.value] = val; |
| | | } |
| | | }; |
| | | // 删除 |
| | | const deleteA = (tag: any) => { |
| | | form.value.examineItemList.splice(form.value.examineItemList.indexOf(tag), 1); |
| | | }; |
| | | // 提交 |
| | | const submitForm = () => { |
| | |
| | | }; |
| | | const activeName = ref('1'); |
| | | // 新增弹窗 |
| | | const index = ref<any>(); |
| | | const Show = ref(); |
| | | const daiAdd = (title: string, data: any) => { |
| | | index.value = form.value.examineItemList.indexOf(data); |
| | | Show.value.openDailog(title, data); |
| | | }; |
| | | // 安全目标指标弹窗 |
| | |
| | | } |
| | | }; |
| | | return { |
| | | index, |
| | | form, |
| | | dialogVisible, |
| | | deleteA, |
| | | AddObj, |
| | | openDailog, |
| | | activeName, |