123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <basic-container>
- <el-alert
- title="可独立修改私有项目的归档规则,不会影响其他项目归档规则"
- type="warning"
- :closable="false">
- </el-alert>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :permission="permissionList"
-
- v-model="form"
- ref="crud"
-
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
- <template slot-scope="{type,size,row}" slot="menu">
- <el-button icon="el-icon-setting" :size="size" :type="type" @click="configurationClick(row)">配置规则</el-button>
-
- </template>
- </avue-crud>
- </basic-container>
- </template>
- <script>
- // import {getList, getDetail, add, update, remove} from "@/api/tentative/testcollect";
- import { getProjectList } from "@/api/manager/projectinfo";
- import {mapGetters} from "vuex";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 20,
- currentPage: 1,
- total: 0
- },
- search:{},
- selectionList: [],
- option: {
-
- addBtn:false,
- editBtn:false,
- delBtn:false,
- menuWidth:330,
- height:'auto',
- calcHeight: 30,
- tip: false,
- searchShow: false,
- searchMenuSpan: 0,
- border: true,
- index: true,
-
- selection: false,
- dialogClickModal: false,
- labelWidth:150,
- column: [
- {
- label: "项目名称",
- prop: "projectName",
- rules: [{
- required: true,
- message: "请输入分类名称",
- trigger: "blur"
- }]
- }
- ]
- },
- data: [],
- };
- },
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- viewBtn: false,
- //addBtn: this.vaildData(this.permission.imageclassificationconfig_add, false),
- //viewBtn: this.vaildData(this.permission.imageclassificationconfig_view, false),
- //delBtn: this.vaildData(this.permission.imageclassificationconfig_delete, false),
- // editBtn: this.vaildData(this.permission.imageclassificationconfig_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- methods: {
-
-
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- // onLoad(page, params = {}) {
- // this.loading = true;
- // getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- // const data = res.data.data;
-
- // this.page.total = data.total;
- // // this.data = data.records;
- // this.data = [{name:'重庆乌江白马枢纽工程项目'}]
- // this.loading = false;
- // this.selectionClear();
- // });
- // },
- onLoad(page, params = {}) {
- this.loading = true;
- getProjectList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
-
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- });
- },
- configurationClick(row){
- //console.log(row);
- //return;
- this.$router.push({
- path: '/manager/projectinfo/archivetreeRule',
- query: {
- projectId:row.id,
- }
- });
- },
-
- }
- };
- </script>
- <style>
- </style>
|