From 870d0b78a4da7ee5ec4ba9c18609a3ca09621e78 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期二, 12 七月 2022 16:24:20 +0800
Subject: [PATCH] 目标
---
src/views/goalManagement/Incentivestandard/component/DailogAdd.vue | 10
src/views/goalManagement/IncentiveRecording/index.vue | 41 +-
src/views/goalManagement/IncentiveRecording/component/DailogSearch.vue | 128 ++++++++++
src/views/goalManagement/TargetBook/component/DailogAdd.vue | 142 +++++++++++
src/views/goalManagement/TargetBook/component/DailogSearch.vue | 126 ++++++++++
src/views/goalManagement/TargetBook/index.vue | 207 +++++++++++++++++
src/views/goalManagement/IncentiveRecording/component/DailogAdd.vue | 50 ++-
7 files changed, 656 insertions(+), 48 deletions(-)
diff --git a/src/views/goalManagement/IncentiveRecording/component/DailogAdd.vue b/src/views/goalManagement/IncentiveRecording/component/DailogAdd.vue
index 8cc7bda..4cc273c 100644
--- a/src/views/goalManagement/IncentiveRecording/component/DailogAdd.vue
+++ b/src/views/goalManagement/IncentiveRecording/component/DailogAdd.vue
@@ -1,30 +1,40 @@
<template>
- <el-dialog v-model="dialogVisible" title="新建奖惩标准设定" width="50%" draggable>
+ <el-dialog v-model="dialogVisible" title="新建奖惩记录" width="50%" draggable>
<el-form :model="form" label-width="120px">
<el-row>
- <el-col :span="11">
- <el-form-item label="奖惩类型">
- <el-select v-model="form.region" style="width:100%" placeholder="">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="11" :offset="2">
- <el-form-item label="奖惩内容">
- <el-input v-model="form.name" />
+ <el-col :span="24">
+ <el-form-item label="员工姓名">
+ <el-input v-model="form.name" placeholder="请选择">
+ <template #append> <el-button :icon="Search" @click="daiInpts" /> </template
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="奖惩名称">
- <el-input v-model="form.name" />
+ <el-input v-model="form.name" placeholder="请选择">
+ <template #append> <el-button :icon="Search" @click="daiInpt" /> </template
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
- <el-form-item label="依据">
+ <el-form-item label="奖惩类型">
<el-input v-model="form.name" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="奖惩内容">
+ <el-input v-model="form.name" placeholder="请填写奖惩内容" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="依据">
+ <el-input v-model="form.name" placeholder="请填写奖惩依据"/>
</el-form-item>
</el-col>
</el-row>
@@ -43,14 +53,16 @@
</span>
</template>
</el-dialog>
+ <DailogSearchUser ref="Show"></DailogSearchUser>
<DailogSearch ref="Shows"></DailogSearch>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from 'vue';
import { Search } from '@element-plus/icons-vue';
-import DailogSearch from '../../../../components/DailogSearch/DailogSearch.vue';
+import DailogSearch from './DailogSearch.vue';
+import DailogSearchUser from '/@/components/DailogSearchUser/index.vue'
export default defineComponent({
- components: { DailogSearch },
+ components: { DailogSearch,DailogSearchUser },
setup() {
const dialogVisible = ref<boolean>(false);
const form = reactive({
@@ -75,6 +87,10 @@
const daiInpt = () => {
Shows.value.openDailog();
};
+ const Show = ref();
+ const daiInpts = () => {
+ Show.value.openDailog();
+ };
return {
form,
dialogVisible,
@@ -82,6 +98,8 @@
activeName,
Shows,
daiInpt,
+ Show,
+ daiInpts,
Search,
};
},
diff --git a/src/views/goalManagement/IncentiveRecording/component/DailogSearch.vue b/src/views/goalManagement/IncentiveRecording/component/DailogSearch.vue
new file mode 100644
index 0000000..88ad9a9
--- /dev/null
+++ b/src/views/goalManagement/IncentiveRecording/component/DailogSearch.vue
@@ -0,0 +1,128 @@
+<template>
+ <el-dialog v-model="dialogVisible" title="奖惩类型" width="50%" draggable>
+ <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-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="奖惩名称" width="180" />
+ <el-table-column align="center" prop="name" label="奖惩类型" width="180" />
+ <el-table-column align="center" prop="address" 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-tag>
+ </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>
+ </span>
+ </template>
+ </el-dialog>
+</template>
+<script lang="ts">
+import { defineComponent, reactive, ref } from 'vue';
+import { Delete } from '@element-plus/icons-vue';
+export default defineComponent({
+ setup() {
+ const dialogVisible = ref<boolean>(false);
+ const openDailog = () => {
+ dialogVisible.value = true;
+ };
+ // 搜索条件
+ const ruleForm = reactive({
+ pass: '',
+ checkPass: '',
+ });
+ // 表格
+ const tableData = [
+ {
+ date: '2016-05-03',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-02',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-04',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-01',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ ];
+ const pageSize4 = ref(100);
+ const handleSizeChange = (val: number) => {
+ console.log(`${val} items per page`);
+ };
+ const handleCurrentChange = (val: number) => {
+ console.log(`current page: ${val}`);
+ };
+ // 右方点击添加后显示标签
+ const dynamicTags = ref(['Tag 1', 'Tag 2', 'Tag 3']);
+ const handleClose = (tag: string) => {
+ dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+ };
+ return {
+ dialogVisible,
+ openDailog,
+ ruleForm,
+ tableData,
+ pageSize4,
+ handleSizeChange,
+ handleCurrentChange,
+ dynamicTags,
+ handleClose,
+ Delete,
+ };
+ },
+});
+</script>
+<style scoped>
+.el-row {
+ padding: 0 0 20px 0;
+}
+</style>
diff --git a/src/views/goalManagement/IncentiveRecording/index.vue b/src/views/goalManagement/IncentiveRecording/index.vue
index 1aa0f84..876e04d 100644
--- a/src/views/goalManagement/IncentiveRecording/index.vue
+++ b/src/views/goalManagement/IncentiveRecording/index.vue
@@ -3,10 +3,9 @@
<el-row>
<el-col :span="4">
<el-form-item>
- <el-select v-model="ruleForm.region" style="width:100%" placeholder="">
- <el-option label="Zone one" value="shanghai" />
- <el-option label="Zone two" value="beijing" />
- </el-select>
+ <el-input v-model="ruleForm.name" placeholder="请选择被奖惩者">
+ <template #append> <el-button :icon="Search" @click="openSearch" /> </template
+ ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="4">
@@ -30,24 +29,23 @@
<el-button type="danger" :icon="Delete" plain>删除</el-button>
</div>
<div>
- <el-button :icon="Upload" @click="upButton"></el-button>
<el-button :icon="Download"></el-button>
<el-button :icon="Refresh"></el-button>
</div>
</div>
<el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
<el-table-column type="selection" align="center" width="55" />
- <el-table-column label="奖惩名称" align="center" sortable>
+ <el-table-column label="奖惩日期" align="center" sortable>
<template #default="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column property="name" align="center" label="奖惩类型" sortable />
+ <el-table-column property="name" align="center" label="被奖惩者" sortable />
<el-table-column property="address" label="奖惩内容" align="center" sortable show-overflow-tooltip />
- <el-table-column property="address" label="依据" align="center" sortable show-overflow-tooltip />
+ <el-table-column property="address" label="奖惩依据" align="center" sortable show-overflow-tooltip />
<!-- <el-table-column property="address" label="指标级别" align="center" sortable show-overflow-tooltip />
<el-table-column property="address" label="完成期限" align="center" sortable show-overflow-tooltip />
<el-table-column property="address" label="状态" align="center" sortable show-overflow-tooltip /> -->
- <el-table-column property="address" label="备注信息" align="center" sortable show-overflow-tooltip />
- <el-table-column label="操作" align="center" sortable show-overflow-tooltip>
+ <el-table-column label="操作" align="center" style="width:300px">
<template #default>
<el-button link type="primary" size="default" :icon="View">查看</el-button>
<el-button link type="primary" size="default" :icon="EditPen">修改</el-button>
@@ -70,15 +68,15 @@
/>
</div>
<DailogAdd ref="openAdd"></DailogAdd>
- <upData ref="upShow"></upData>
+ <DailogSearchUser ref="openUser"></DailogSearchUser>
</div>
</template>
<script lang="ts">
import DailogAdd from './component/DailogAdd.vue'
-import upData from '../../../components/updata/updata.vue';
+import DailogSearchUser from '/@/components/DailogSearchUser/index.vue'
import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
-import { Plus, Delete, Upload, Download, Refresh, View,EditPen } from '@element-plus/icons-vue';
+import { Plus, Delete, Upload, Download, Refresh, View,EditPen,Search} from '@element-plus/icons-vue';
interface User {
date: string;
name: string;
@@ -86,7 +84,7 @@
}
import type { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
export default defineComponent({
- components: { ElButton, ElInput, upData,DailogAdd },
+ components: { ElButton, ElInput,DailogAdd,DailogSearchUser },
setup() {
// 搜索条件
const ruleForm = reactive({
@@ -151,12 +149,10 @@
const openD = () => {
openAdd.value.openDailog();
};
-
- // 上传
- const upShow = ref();
- const upButton = () => {
- upShow.value.openDialog();
- };
+ const openUser =ref();
+ const openSearch=()=>{
+ openUser.value.openDailog()
+ }
return {
tableData,
@@ -167,19 +163,20 @@
handleCurrentChange,
openAdd,
openD,
- upShow,
- upButton,
small,
disabled,
background,
ruleForm,
+ openUser,
+ openSearch,
Plus,
Delete,
Upload,
Download,
Refresh,
View,
- EditPen
+ EditPen,
+ Search
};
},
});
diff --git a/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue b/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
index 8cc7bda..aa4698c 100644
--- a/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
+++ b/src/views/goalManagement/Incentivestandard/component/DailogAdd.vue
@@ -43,14 +43,11 @@
</span>
</template>
</el-dialog>
- <DailogSearch ref="Shows"></DailogSearch>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from 'vue';
import { Search } from '@element-plus/icons-vue';
-import DailogSearch from '../../../../components/DailogSearch/DailogSearch.vue';
export default defineComponent({
- components: { DailogSearch },
setup() {
const dialogVisible = ref<boolean>(false);
const form = reactive({
@@ -70,18 +67,11 @@
const activeName = ref('1');
// 表格
- // 安全目标指标弹窗
- const Shows = ref();
- const daiInpt = () => {
- Shows.value.openDailog();
- };
return {
form,
dialogVisible,
openDailog,
activeName,
- Shows,
- daiInpt,
Search,
};
},
diff --git a/src/views/goalManagement/TargetBook/component/DailogAdd.vue b/src/views/goalManagement/TargetBook/component/DailogAdd.vue
new file mode 100644
index 0000000..4d7d2da
--- /dev/null
+++ b/src/views/goalManagement/TargetBook/component/DailogAdd.vue
@@ -0,0 +1,142 @@
+<template>
+ <el-dialog v-model="dialogVisible" title="新建目标责任书" width="50%" draggable>
+ <el-form :model="form" label-width="120px">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="岗位">
+ <el-input v-model="form.name" placeholder="请选择">
+ <template #append> <el-button :icon="Search" @click="daiInpt" /> </template
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="责任书签订日期">
+ <el-date-picker v-model="form.date1" type="date" placeholder="Pick a date" style="width: 100%" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="备注信息">
+ <el-input v-model="form.name" type="textarea" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="责任书附件">
+ <el-upload
+ v-model:file-list="fileList"
+ class="upload-demo"
+ action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
+ multiple
+ :on-preview="handlePreview"
+ :on-remove="handleRemove"
+ :before-remove="beforeRemove"
+ :limit="3"
+ :on-exceed="handleExceed"
+ >
+ <el-button type="primary">点击上传</el-button>
+ <template #tip>
+ <div class="el-upload__tip">添加相关附件</div>
+ </template>
+ </el-upload>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <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>
+ </span>
+ </template>
+ </el-dialog>
+ <DailogSearch ref="Shows"></DailogSearch>
+</template>
+<script lang="ts">
+import { defineComponent, ref, reactive } from 'vue';
+import { Search } from '@element-plus/icons-vue';
+import DailogSearch from './DailogSearch.vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import type { UploadProps, UploadUserFile } from 'element-plus';
+export default defineComponent({
+ components: { DailogSearch },
+ setup() {
+ const dialogVisible = ref<boolean>(false);
+ const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+ });
+ const openDailog = (type: string, value: any, projectList: any, projectId: string) => {
+ dialogVisible.value = true;
+ };
+ // 导航
+ const activeName = ref('1');
+ // 表格
+
+ // 安全目标指标弹窗
+ const Shows = ref();
+ const daiInpt = () => {
+ Shows.value.openDailog();
+ };
+ // 点击上传
+ const fileList = ref<UploadUserFile[]>([
+ {
+ name: 'element-plus-logo.svg',
+ url: 'https://element-plus.org/images/element-plus-logo.svg',
+ },
+ {
+ name: 'element-plus-logo2.svg',
+ url: 'https://element-plus.org/images/element-plus-logo.svg',
+ },
+ ]);
+
+ const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
+ console.log(file, uploadFiles);
+ };
+
+ const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
+ console.log(uploadFile);
+ };
+
+ const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
+ ElMessage.warning(`The limit is 3, you selected ${files.length} files this time, add up to ${files.length + uploadFiles.length} totally`);
+ };
+
+ const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
+ return ElMessageBox.confirm(`Cancel the transfert of ${uploadFile.name} ?`).then(
+ () => true,
+ () => false
+ );
+ };
+ return {
+ form,
+ dialogVisible,
+ openDailog,
+ activeName,
+ Shows,
+ daiInpt,
+ Search,
+ fileList,
+ handleRemove,
+ handlePreview,
+ handleExceed,
+ beforeRemove
+ };
+ },
+});
+</script>
+<style scoped>
+.el-row {
+ padding: 0 0 20px 0;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/goalManagement/TargetBook/component/DailogSearch.vue b/src/views/goalManagement/TargetBook/component/DailogSearch.vue
new file mode 100644
index 0000000..5801430
--- /dev/null
+++ b/src/views/goalManagement/TargetBook/component/DailogSearch.vue
@@ -0,0 +1,126 @@
+<template>
+ <el-dialog v-model="dialogVisible" title="选择岗位" width="50%" draggable>
+ <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-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-tag>
+ </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>
+ </span>
+ </template>
+ </el-dialog>
+</template>
+<script lang="ts">
+import { defineComponent, reactive, ref } from 'vue';
+import { Delete } from '@element-plus/icons-vue';
+export default defineComponent({
+ setup() {
+ const dialogVisible = ref<boolean>(false);
+ const openDailog = () => {
+ dialogVisible.value = true;
+ };
+ // 搜索条件
+ const ruleForm = reactive({
+ pass: '',
+ checkPass: '',
+ });
+ // 表格
+ const tableData = [
+ {
+ date: '2016-05-03',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-02',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-04',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-01',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ ];
+ const pageSize4 = ref(100);
+ const handleSizeChange = (val: number) => {
+ console.log(`${val} items per page`);
+ };
+ const handleCurrentChange = (val: number) => {
+ console.log(`current page: ${val}`);
+ };
+ // 右方点击添加后显示标签
+ const dynamicTags = ref(['Tag 1', 'Tag 2', 'Tag 3']);
+ const handleClose = (tag: string) => {
+ dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+ };
+ return {
+ dialogVisible,
+ openDailog,
+ ruleForm,
+ tableData,
+ pageSize4,
+ handleSizeChange,
+ handleCurrentChange,
+ dynamicTags,
+ handleClose,
+ Delete,
+ };
+ },
+});
+</script>
+<style scoped>
+.el-row {
+ padding: 0 0 20px 0;
+}
+</style>
diff --git a/src/views/goalManagement/TargetBook/index.vue b/src/views/goalManagement/TargetBook/index.vue
new file mode 100644
index 0000000..f08494a
--- /dev/null
+++ b/src/views/goalManagement/TargetBook/index.vue
@@ -0,0 +1,207 @@
+<template>
+ <el-form ref="ruleFormRef" :model="ruleForm" status-icon label-width="20px" class="topTitle">
+ <el-row>
+ <el-col :span="4">
+ <el-form-item>
+ <el-input v-model="ruleForm.name" placeholder="请选择岗位">
+ <template #append> <el-button :icon="Search" @click="openSearch" /> </template
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="4">
+ <el-form-item>
+ <el-input v-model="ruleForm.checkPass" placeholder="目标指标编号" />
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="4">
+ <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>
+ <div class="minCenter">
+ <div class="btns">
+ <div>
+ <el-button type="primary" :icon="Plus" @click="openD">新建</el-button>
+ <el-button type="warning" plain :icon="EditPen">修改</el-button>
+ <el-button type="danger" :icon="Delete" plain>删除</el-button>
+ </div>
+ <div>
+ <el-button :icon="Download"></el-button>
+ <el-button :icon="Refresh"></el-button>
+ </div>
+ </div>
+ <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
+ <el-table-column type="selection" align="center" width="55" />
+ <el-table-column type="index" label="序号" align="center" width="70" />
+ <el-table-column label="岗位" align="center" sortable>
+ <template #default="scope">{{ scope.row.date }}</template>
+ </el-table-column>
+ <el-table-column property="name" align="center" label="责任书签订日期" sortable />
+ <el-table-column property="name" align="center" label="附件" sortable />
+ <el-table-column property="address" label="备注信息" align="center" sortable show-overflow-tooltip />
+ <!-- <el-table-column property="address" label="奖惩依据" align="center" sortable show-overflow-tooltip /> -->
+ <!-- <el-table-column property="address" label="指标级别" align="center" sortable show-overflow-tooltip />
+ <el-table-column property="address" label="完成期限" align="center" sortable show-overflow-tooltip />
+ <el-table-column property="address" label="状态" align="center" sortable show-overflow-tooltip /> -->
+ <el-table-column label="操作" align="center" style="width:300px">
+ <template #default>
+ <el-button link type="primary" size="default" :icon="View">查看</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen">修改</el-button>
+ <el-button link type="primary" size="default" :icon="Delete">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <div class="pages">
+ <el-pagination
+ 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"
+ />
+ </div>
+ <DailogAdd ref="openAdd"></DailogAdd>
+ <DailogSearch ref="openUser"></DailogSearch>
+ </div>
+</template>
+<script lang="ts">
+import DailogAdd from './component/DailogAdd.vue'
+import DailogSearch from './component/DailogSearch.vue'
+import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
+import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
+import { Plus, Delete, Upload, Download, Refresh, View,EditPen,Search} from '@element-plus/icons-vue';
+interface User {
+ date: string;
+ name: string;
+ address: string;
+}
+import type { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
+export default defineComponent({
+ components: { ElButton, ElInput,DailogAdd,DailogSearch },
+ setup() {
+ // 搜索条件
+ const ruleForm = reactive({
+ pass: '',
+ checkPass: '',
+ });
+
+ const formatter = (row: User, column: TableColumnCtx<User>) => {
+ return row.address;
+ };
+
+ const tableData: User[] = [
+ {
+ date: '2016-05-03',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-02',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-04',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-01',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-08',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-06',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-07',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ ];
+ const currentPage4 = ref(4);
+ const pageSize4 = ref(100);
+ const small = ref(false);
+ const disabled = ref(false);
+ const background = ref(false);
+ const handleSizeChange = (val: number) => {
+ console.log(`${val} items per page`);
+ };
+ const handleCurrentChange = (val: number) => {
+ console.log(`current page: ${val}`);
+ };
+ // 弹窗
+ const openAdd = ref();
+ const openD = () => {
+ openAdd.value.openDailog();
+ };
+ const openUser =ref();
+ const openSearch=()=>{
+ openUser.value.openDailog()
+ }
+ return {
+
+ tableData,
+ formatter,
+ currentPage4,
+ pageSize4,
+ handleSizeChange,
+ handleCurrentChange,
+ openAdd,
+ openD,
+ small,
+ disabled,
+ background,
+ ruleForm,
+ openUser,
+ openSearch,
+ Plus,
+ Delete,
+ Upload,
+ Download,
+ Refresh,
+ View,
+ EditPen,
+ Search
+ };
+ },
+});
+</script>
+<style scoped>
+.minCenter {
+ width: 100%;
+ background-color: #fff;
+ margin-top: 10px;
+ padding: 0 20px;
+}
+.topTitle {
+ background-color: #fff;
+ padding: 20px 0px 20px 0px;
+ margin-bottom:10px ;
+}
+.btns {
+ padding: 10px 0px 10px 0px;
+ display: flex;
+ justify-content: space-between;
+}
+.pages {
+ padding: 20px 0;
+ display: flex;
+ justify-content: right;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.2