|
@@ -1,536 +0,0 @@
|
|
|
-<!-- 代码生成 -->
|
|
|
-<template>
|
|
|
- <div class="recruitmentPlanBox">
|
|
|
- <div class="header">
|
|
|
- <el-form :inline="true" :model="planHeaderForm" class="demo-form-inline" ref="planHeaderForm">
|
|
|
- <el-form-item label="表名称:" prop="name" style="margin-left: 20px; margin-top: 20px;">
|
|
|
- <el-input v-model="planHeaderForm.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="表描述:" prop="cardId" style="margin-top: 20px;">
|
|
|
- <el-input v-model="planHeaderForm.cardId"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <div class="block">
|
|
|
- <span class="demonstration" style="margin-right: 8px; color: #606266;">表时间:</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="value1"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button round type="primary" icon="el-icon-search" @click="onSearch"
|
|
|
- style="margin-left: 20px;margin-top: 20px;">搜索</el-button>
|
|
|
- <el-button round icon="el-icon-refresh" @click="resetForm('planHeaderForm')"
|
|
|
- style="margin-left: 20px;margin-top: 20px;">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div class="content">
|
|
|
- <div class="con">
|
|
|
- <el-button type="primary" icon="el-icon-plus" style="margin-left: 30px;" @click="gent">生成</el-button>
|
|
|
- <el-button type="warning" icon="el-icon-download">导入</el-button>
|
|
|
- <el-button type="success" icon="el-icon-edit-outline">修改</el-button>
|
|
|
- <el-button type="danger" icon="el-icon-close" @click="delet">删除</el-button>
|
|
|
- </div>
|
|
|
- <!-- 右侧栏 -->
|
|
|
- <div class="con cons">
|
|
|
- <div class="b_r b_ro">
|
|
|
- <i class="el-icon-search" title="搜索"></i>
|
|
|
- </div>
|
|
|
- <div class="b_r">
|
|
|
- <i class="el-icon-refresh" title="刷新"></i>
|
|
|
- </div>
|
|
|
- <div class="b_r" @click="show = !show">
|
|
|
- <i class="el-icon-notebook-2" title="切换"></i>
|
|
|
- </div>
|
|
|
- <div class="b_r b_rs">
|
|
|
- <el-dropdown :hide-on-click="false">
|
|
|
- <div class="b_rf">
|
|
|
- <i class="el-icon-s-grid" title="列"></i>
|
|
|
- <i class="el-icon-caret-bottom" title="列"></i>
|
|
|
- </div>
|
|
|
- <!-- 右侧栏 -->
|
|
|
- <!-- 下拉菜单 -->
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.inviteid">编号</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.serial">序号</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.organid">表名称</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.wanttype">表描述</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.wantyear">实体类名称</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.planwant">创建时间</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.wantnumber">更新时间</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-checkbox v-model="showColumn.post">操作</el-checkbox>
|
|
|
- </el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <!-- 下拉菜单 -->
|
|
|
- </div>
|
|
|
- <div class="b_r b_ed">
|
|
|
- <i class="el-icon-download" title="Export data"></i>
|
|
|
- <i class="el-icon-caret-bottom" title="Export data"></i>
|
|
|
- </div>
|
|
|
- <plan-con></plan-con>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 右侧栏 -->
|
|
|
- <!-- 切换前列表 -->
|
|
|
- <el-table v-show="show" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
|
|
|
- @select="handleSelectionChange" @select-all="handleSelectionChangeall">
|
|
|
- <el-table-column type="selection"> </el-table-column>
|
|
|
- <el-table-column label="编号" v-if="showColumn.inviteid">
|
|
|
- <template slot-scope="scope">{{ scope.row.date }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="序号" v-if="showColumn.serial">
|
|
|
- <template slot-scope="scope">{{ scope.row.key }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="表名称" v-if="showColumn.organid">
|
|
|
- <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="type" label="表描述" v-if="showColumn.wanttype">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="year" label="实体类名称" width="240" v-if="showColumn.wantyear">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="number" label="创建时间" width="200" v-if="showColumn.planwant">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="num" label="更新时间" v-if="showColumn.wantnumber">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="num" label="操作" width="400" v-if="showColumn.post">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button size="mini" icon="el-icon-search" type="success" @click="handledeploy(scope.$index, scope.row)">预览</el-button>
|
|
|
- <el-button size="mini" icon="el-icon-edit-outline" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
- <el-button size="mini" icon="el-icon-close" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
|
- <el-button size="mini" icon="el-icon-plus" type="warning" @click="handleExport(scope.$index, scope.row)">生成代码</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- 切换前列表 -->
|
|
|
- <!-- 分页 -->
|
|
|
- <div class="block1">
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage4" :page-sizes="[10, 20, 30, 40]" :page-size="100"
|
|
|
- layout="total, sizes, prev, pager, next, jumper" :total="100">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- <!-- 切换后列表 -->
|
|
|
- <div v-show="!show">
|
|
|
- <div v-for="(item, index) in tableData" class="col-md" :key="index">
|
|
|
- <el-checkbox v-model="item.show" style="width: 100%;white-space: normal;"
|
|
|
- @change="handleCheckedCitiesChange(item)" class="checkboxs">
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.inviteid">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">ID</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.date }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.serial">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">KEY</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.key }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.organid">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">名称</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.date }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.wanttype">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">版本</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.name }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.wantyear">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">创建时间</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.type }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.planwant">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">最后更新时间</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.year }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.wantnumber">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">元数据</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.number }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="grid-text" v-if="showColumn.post">
|
|
|
- <el-col :span="8">
|
|
|
- <div class="grid-content bg-purple">操作</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <div class="grid-content bg-purple">{{ item.nums }}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 切换后列表 -->
|
|
|
- <Dialog :showdWorker="showDialog" :Text="dialogText" @closes="showDialog=false" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import Dialog from "../components/Dialog.vue";
|
|
|
-import planHeader from "../recruitmentManagement/recruitmentPlan/components/planHeader.vue";
|
|
|
-import planCon from "../recruitmentManagement/recruitmentPlan/components/planCon.vue";
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- showDialog: false,
|
|
|
- dialogText: '',
|
|
|
- currentPage1: 5,
|
|
|
- currentPage2: 5,
|
|
|
- currentPage3: 5,
|
|
|
- currentPage4: 1,
|
|
|
- visible: false,
|
|
|
- show: true, //表单切换
|
|
|
- planHeaderForm: {
|
|
|
- unit: "",
|
|
|
- years: "",
|
|
|
- cardId: '',
|
|
|
- },
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- key:"process",
|
|
|
- name: "岗位设置流程",
|
|
|
- type: "1",
|
|
|
- number: "2022-06-29 10:49:07",
|
|
|
- num: "0",
|
|
|
- year: "2020-07-14 13:45:59",
|
|
|
- },
|
|
|
- ],
|
|
|
- multipleSelection: [],
|
|
|
- showColumn: {
|
|
|
- inviteid: true,
|
|
|
- serial: true,
|
|
|
- organid: true,
|
|
|
- want: true,
|
|
|
- wanttype: true,
|
|
|
- wantyear: true,
|
|
|
- planwant: true,
|
|
|
- wantnumber: true,
|
|
|
- post: true,
|
|
|
- },
|
|
|
- value1: '',
|
|
|
- }
|
|
|
- },
|
|
|
- methods() {
|
|
|
- // 发请求得到showColumnInitData的列的名字
|
|
|
- if (localStorage.getItem("columnSet")) {
|
|
|
- this.showColumn = JSON.parse(localStorage.getItem("columnSet"));
|
|
|
- } else {
|
|
|
- this.showColumn = {
|
|
|
- inviteid: false,
|
|
|
- serial: true,
|
|
|
- organid: true,
|
|
|
- want: true,
|
|
|
- wanttype: true,
|
|
|
- wantyear: true,
|
|
|
- planwant: true,
|
|
|
- wantnumber: true,
|
|
|
- hired: true,
|
|
|
- remark: true,
|
|
|
- creator: true,
|
|
|
- creationtime: true,
|
|
|
- modifier: true,
|
|
|
- modifiertime: true,
|
|
|
- accessory: true,
|
|
|
- };
|
|
|
- }
|
|
|
- },
|
|
|
- beforeUpdate() {
|
|
|
- if (this.show) {
|
|
|
- this.$nextTick(() => {
|
|
|
- //在数据加载完,重新渲染表格
|
|
|
- this.$refs["multipleTable"].doLayout();
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- gent() {
|
|
|
- this.showDialog = true
|
|
|
- this.dialogText = '确认要生成选中的1条数据吗?'
|
|
|
- },
|
|
|
- delet() {
|
|
|
- this.showDialog = true
|
|
|
- this.dialogText = '确认要删除选中的1条数据吗?'
|
|
|
- },
|
|
|
- handleEdit(index, row) {
|
|
|
- console.log(index, row);
|
|
|
- },
|
|
|
- handleDelete(index, row) {
|
|
|
- console.log(index, row);
|
|
|
- },
|
|
|
- handledeploy(index, row) {
|
|
|
- console.log(index, row);
|
|
|
- },
|
|
|
- handleExport(index, row) {
|
|
|
- console.log(index, row);
|
|
|
- },
|
|
|
- handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
- },
|
|
|
- handleSelectionChange(selection, val) {
|
|
|
- val.show = !val.show;
|
|
|
- },
|
|
|
- handleSelectionChangeall(selection) {
|
|
|
- if (selection.length == 0) {
|
|
|
- this.tableData.forEach((val) => {
|
|
|
- val.show = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- selection.forEach((val) => {
|
|
|
- val.show = true;
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- handleCheckedCitiesChange(val) {
|
|
|
- this.$refs.multipleTable.toggleRowSelection(val);
|
|
|
- },
|
|
|
- saveColumn() {
|
|
|
- localStorage.setItem("columnSet", JSON.stringify(this.showColumn));
|
|
|
- this.visible = false;
|
|
|
- },
|
|
|
- },
|
|
|
- name: "contract",
|
|
|
- components: {
|
|
|
- Dialog,
|
|
|
- planHeader,
|
|
|
- planCon,
|
|
|
- },
|
|
|
-}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped>
|
|
|
-.recruitmentPlanBox {
|
|
|
- height: 100%;
|
|
|
- min-width: 1200px;
|
|
|
-}
|
|
|
-
|
|
|
-.recruitmentPlanBox .header {
|
|
|
- background: #ffffff;
|
|
|
- border-radius: 10px;
|
|
|
- box-shadow: 1px 1px 3px rgb(0 0 0 / 20%);
|
|
|
- margin-bottom: 20px;
|
|
|
-}
|
|
|
-
|
|
|
-.recruitmentPlanBox .con {
|
|
|
- background: #ffffff;
|
|
|
- height: calc(100% - 90px);
|
|
|
- padding-top: 20px;
|
|
|
- margin-right: 20px;
|
|
|
- display: flex;
|
|
|
-}
|
|
|
-
|
|
|
-.content {
|
|
|
- display: flex;
|
|
|
- border-radius:10px 10px 0 0;
|
|
|
- justify-content: space-between;
|
|
|
- background: #ffffff;
|
|
|
-}
|
|
|
-
|
|
|
-.cons {
|
|
|
- display: flex;
|
|
|
-}
|
|
|
-
|
|
|
-.b_r {
|
|
|
- border: 1px solid #dcdcdc;
|
|
|
- border-right: none;
|
|
|
- color: #000;
|
|
|
- font-size: 24px;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
-
|
|
|
-.b_rs {
|
|
|
- border-right: 1px solid #dcdcdc;
|
|
|
- color: #000;
|
|
|
- font-size: 24px;
|
|
|
- cursor: pointer;
|
|
|
- /* border-radius: 0 5px 5px 0; */
|
|
|
-}
|
|
|
-
|
|
|
-.b_ro {
|
|
|
- border-radius: 5px 0 0 5px;
|
|
|
-}
|
|
|
-
|
|
|
-.b_rf {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-.b_ed {
|
|
|
- border-radius: 0 5px 5px 0;
|
|
|
- border-right: 1px solid #dcdcdc;
|
|
|
- border-left: none;
|
|
|
- font-size: 18px;
|
|
|
- line-height: 32px;
|
|
|
-}
|
|
|
-
|
|
|
-.b_r:hover {
|
|
|
- color: #ffffff;
|
|
|
- background-color: #999;
|
|
|
-}
|
|
|
-
|
|
|
-.b_rf:hover {
|
|
|
- color: #ffffff;
|
|
|
- background-color: #999;
|
|
|
-}
|
|
|
-
|
|
|
-.el-icon-search {
|
|
|
- padding: 10px 10px 10px 10px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
-}
|
|
|
-
|
|
|
-.el-icon-refresh {
|
|
|
- padding: 10px 10px 10px 10px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
-}
|
|
|
-
|
|
|
-.el-icon-notebook-2 {
|
|
|
- padding: 10px 10px 10px 10px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
-}
|
|
|
-
|
|
|
-.el-icon-s-grid {
|
|
|
- padding: 10px 0px 10px 10px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 500;
|
|
|
-}
|
|
|
-
|
|
|
-.el-icon-caret-bottom {
|
|
|
- font-size: 16px;
|
|
|
- padding: 10px 10px 10px 0;
|
|
|
- font-size: 10px;
|
|
|
- font-weight: 500;
|
|
|
-}
|
|
|
-
|
|
|
-.fade-enter-active,
|
|
|
-.fade-leave-active {
|
|
|
- transition: opacity 0.3s;
|
|
|
-}
|
|
|
-
|
|
|
-.fade-enter,
|
|
|
-.fade-leave-to {
|
|
|
- opacity: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.chenkbox {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
-}
|
|
|
-
|
|
|
-.col-md {
|
|
|
- background: #fff;
|
|
|
- padding: 15px;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-text {
|
|
|
- margin-top: 5px;
|
|
|
-}
|
|
|
-
|
|
|
-::v-deep .el-checkbox__label {
|
|
|
- width: 100%;
|
|
|
-}
|
|
|
-
|
|
|
-::v-deep .checkboxs .el-checkbox__input {
|
|
|
- margin-left: 10px;
|
|
|
-}
|
|
|
-
|
|
|
-.block1 {
|
|
|
- padding: 30px 0 20px 30px;
|
|
|
- background-color: #fff;
|
|
|
- border-radius: 0 0 10px 10px;
|
|
|
-}
|
|
|
-.block {
|
|
|
- margin-top: 20px;
|
|
|
-}
|
|
|
-</style>
|