123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <template>
- <div>
- <div class="simple-container">
- <simple-form
- :form="table_form"
- @search="handleSearch"
- ></simple-form>
- <simple-table
- :list="table_list"
- :config="table_config"
- :loading="table_loading"
- :handle-row="table_handle_row"
- @detail="handleVisible"
- @edit="handleVisible"
- ></simple-table>
- <simple-pagination
- :page="page"
- :total="total"
- @change="handleChange"
- ></simple-pagination>
- </div>
- <simple-dialog
- title="查看"
- fullscreen
- @cancel="handleVisible"
- @confirm="handleVisible"
- :visible="template_visible"
- ><div class="flex-justify-between padding-right-20 padding-left-20">
- <div class="color-ffffff">1</div>
- <div>
- <el-button type="primary">导出</el-button>
- <el-button @click="handleVisible" type="primary">返回</el-button>
- </div>
- </div>
- <analysis />
- <template v-slot:footer><div></div></template>
- </simple-dialog>
- </div>
- </template>
- <script>
- import analysis from "./analysis.vue";
- import simpleForm from "./components/form.vue";
- import simpleTable from "./components/table.vue";
- import simpleDialog from "./components/dialog.vue";
- import simplePagination from "./components/pagination.vue";
- export default {
- components: {
- analysis,
- simpleTable,
- simpleDialog,
- simpleForm,
- simplePagination,
- },
- data() {
- return {
- page: 1,
- rows: 10,
- total: 0,
- template_visible: false,
- table_loading: false,
- table_search: {},
- table_form: [
- {
- label: "模板名称",
- props: "template_name",
- type: "select",
- dictionary: [
- {
- label: "GS",
- value: "GS",
- },
- {
- label: "KPI",
- value: "KPI",
- },
- ],
- },
- {
- label: "截止日期",
- props: "date",
- type: "date",
- },
- ],
- table_list: [],
- table_handle_row: [
- {
- label: "查看",
- props: "detail",
- },
- // {
- // label: "修改",
- // props: "edit",
- // },
- {
- label: "撤回",
- props: "delete",
- popconfirm: true,
- },
- ],
- table_config: [
- {
- label: "绩效类型",
- props: "performance_type",
- },
- {
- label: "模板名称",
- props: "template_name",
- },
- {
- label: "填报事由",
- props: "reason",
- },
- {
- label: "填报注意事项",
- props: "note",
- },
- {
- label: "截止时间",
- props: "date",
- },
- {
- label: "接收人",
- props: "receiver",
- },
- ],
- };
- },
- methods: {
- async handleInit() {
- this.table_loading = true;
- const data = [];
- let index = 0;
- while (index < 10) {
- data.push({
- performance_type: `GS`,
- template_name: `信息技术中心2021年度部门GS绩效计划(${index})`,
- reason: `填报事由${index}`,
- note: `填报注意事项${index}`,
- date: `2021.02.01`,
- receiver: `邱钰、郭鹏`,
- });
- index = index + 1;
- }
- this.total = index;
- this.table_list = data;
- this.table_loading = false;
- },
- handleSearch({ template_name }) {
- this.table_search = { template_name };
- this.handleReset();
- this.handleInit();
- },
- handleChange(page) {
- this.page = page;
- this.handleInit();
- },
- handleVisible() {
- this.template_visible = !this.template_visible;
- },
- handleReset() {
- this.page = 1;
- },
- },
- mounted() {
- this.handleInit();
- },
- };
- </script>
- <style></style>
|