From 7df64634d3d7b292713eebfa008c40b3f5f9f65f Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: Tue, 20 Sep 2022 15:57:03 +0800
Subject: [PATCH] 修改
---
src/views/goalManagement/TargetBook/component/DailogSearch.vue | 151 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 100 insertions(+), 51 deletions(-)
diff --git a/src/views/goalManagement/TargetBook/component/DailogSearch.vue b/src/views/goalManagement/TargetBook/component/DailogSearch.vue
index 5801430..54a6871 100644
--- a/src/views/goalManagement/TargetBook/component/DailogSearch.vue
+++ b/src/views/goalManagement/TargetBook/component/DailogSearch.vue
@@ -1,65 +1,82 @@
<template>
- <el-dialog v-model="dialogVisible" title="选择岗位" width="50%" draggable>
+ <el-dialog v-model="dialogVisible" :fullscreen="full" title="选择岗位" width="50%" draggable>
+ <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
<el-row>
<el-col :span="17">
- <el-form ref="ruleFormRef" :model="ruleForm" status-icon>
- <el-row>
- <el-col :span="12">
- <el-form-item>
- <el-input v-model="ruleForm.pass" placeholder="岗位名称" />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6" :offset="1">
+ <el-form ref="ruleFormRef" :model="ruleForm" status-icon>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item size="default">
+ <el-input v-model="ruleForm.pass" placeholder="岗位名称" />
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="6" :offset="1">
<el-form-item>
<el-input v-model="ruleForm.checkPass" placeholder="目标指标编号" />
</el-form-item>
</el-col> -->
- <el-col :span="11" :offset="1">
- <el-form-item>
- <el-button type="primary" @click="submitForm(ruleFormRef)">查询</el-button>
- <el-button @click="resetForm(ruleFormRef)">重置</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-button size="default" :icon="Delete">清除选择</el-button>
- <el-table :data="tableData" style="width: 100%;margin-top:20px">
- <el-table-column align="center" type="selection"/>
- <el-table-column align="center" prop="date" label="岗位名称" />
- </el-table>
- <el-pagination
- style="padding:20px 0;border-bottom:1px solid #dedede"
- v-model:currentPage="currentPage4"
- v-model:page-size="pageSize4"
- :page-sizes="[100, 200, 300, 400]"
- :small="small"
- :disabled="disabled"
- :background="background"
- layout="total, sizes, prev, pager, next, jumper"
- :total="400"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </el-col>
- <el-col :span="7">
- <el-tag v-for="tag in dynamicTags" :key="tag" class="mx-1" style="margin:5px" closable :disable-transitions="false" @close="handleClose(tag)">
- {{ tag }}
+ <el-col :span="11" :offset="1">
+ <el-form-item>
+ <el-button size="default" type="primary" @click="submitForm(ruleFormRef)">查询</el-button>
+ <el-button size="default" @click="resetForm(ruleFormRef)">重置</el-button>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <el-button size="default" :icon="Delete">清除选择</el-button>
+ <el-table :data="tableData" style="width: 100%; margin-top: 20px" >
+ <el-table-column align="center" width="70px">
+ <template #default="scope">
+ <el-radio-group v-model="radio1">
+ <el-radio :label="scope.row.id" @click="radio(scope.row)" size="large">{{ null }}</el-radio>
+ </el-radio-group>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" prop="date" label="岗位名称" />
+ </el-table>
+ <el-pagination
+ style="padding: 20px 0; border-bottom: 1px solid #dedede"
+ v-model:currentPage="currentPage4"
+ v-model:page-size="pageSize4"
+ :page-sizes="[100, 200, 300, 400]"
+ :small="small"
+ :disabled="disabled"
+ :background="background"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="1"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
+ </el-col>
+ <el-col :span="7">
+ <div v-if="dynamicTags[0]==''?false:true">
+ <el-tag
+ v-for="tag in dynamicTags"
+ :key="tag"
+ class="mx-1"
+ style="margin: 5px"
+ closable
+ :disable-transitions="false"
+ @close="handleClose(tag)"
+ >
+ {{ tag.date }}
</el-tag>
- </el-col>
+ </div>
+ </el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false" size="default">关闭</el-button>
- <el-button type="primary" @click="dialogVisible = false" size="default">确定</el-button>
+ <el-button type="primary" @click="submitForm" size="default">确定</el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts">
import { defineComponent, reactive, ref } from 'vue';
-import { Delete } from '@element-plus/icons-vue';
+import { Delete, FullScreen } from '@element-plus/icons-vue';
export default defineComponent({
- setup() {
+ setup(props,{emit}) {
const dialogVisible = ref<boolean>(false);
const openDailog = () => {
dialogVisible.value = true;
@@ -71,23 +88,25 @@
});
// 表格
const tableData = [
- {
- date: '2016-05-03',
+ { id:1,
+ date: '岗位1',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
- date: '2016-05-02',
+ id:2,
+ date: '岗位2',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
- {
- date: '2016-05-04',
+ {
+ id:3,
+ date: '岗位3',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
- {
- date: '2016-05-01',
+ { id:4,
+ date: '岗位4',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
@@ -100,11 +119,37 @@
console.log(`current page: ${val}`);
};
// 右方点击添加后显示标签
- const dynamicTags = ref(['Tag 1', 'Tag 2', 'Tag 3']);
+ const dynamicTags = ref(['']);
const handleClose = (tag: string) => {
dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+ radio1.value = '';
+ };
+ const radio1 = ref('');
+ const radio = (event: any) => {
+ dynamicTags.value[0] = event;
+ };
+ const clear=()=>{
+ dynamicTags.value=['']
+ radio1.value=""
+ }
+ const submitForm=()=>{
+ let obj=JSON.parse(JSON.stringify(dynamicTags.value))
+ emit("backNum",obj[0])
+ dialogVisible.value = false
+ }
+ //全屏
+ const full = ref(false);
+ const toggleFullscreen = () => {
+ if (full.value == false) {
+ full.value = true;
+ } else {
+ full.value = false;
+ }
};
return {
+ radio1,
+ radio,
+ clear,
dialogVisible,
openDailog,
ruleForm,
@@ -114,7 +159,11 @@
handleCurrentChange,
dynamicTags,
handleClose,
+ submitForm,
Delete,
+ full,
+ toggleFullscreen,
+ FullScreen,
};
},
});
--
Gitblit v1.9.2