liming 5 년 전
부모
커밋
ccc70bb711

+ 1 - 0
src/layout/layout-part/menus.vue

@@ -71,6 +71,7 @@
         </el-menu-item-group>
       </el-submenu>
       <el-menu-item index="/zhidao/index"> <i class="el-icon-s-grid"></i>指导单位管理</el-menu-item>
+      <el-menu-item index="/tCooperativeOrganization/index"> <i class="el-icon-s-grid"></i>合作机构管理</el-menu-item>
       <el-menu-item index="/news/index"> <i class="el-icon-s-grid"></i>新闻中心管理</el-menu-item>
       <el-menu-item index="/companyup/index"> <i class="el-icon-s-grid"></i>企业修改信息审核管理</el-menu-item>
       <el-submenu index="6">

+ 208 - 0
src/layout/tCooperativeOrganization/tCooperativeOrganizationForm.vue

@@ -0,0 +1,208 @@
+<template>
+  <div id="tCooperativeOrganizationForm">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <span class="shu"></span><span class="title">{{ formTitle }}</span>
+        </el-col>
+        <el-col :span="24" class="form">
+          <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+            <el-form-item label="请选择类型" prop="type">
+              <el-radio-group v-model="ruleForm.type">
+                <el-radio label="1" >银行</el-radio>
+                <el-radio label="2" >担保</el-radio>
+                <el-radio label="3" >创投</el-radio>
+                <el-radio label="4" >协会</el-radio>
+                <el-radio label="5" >金融科技</el-radio>
+                <el-radio label="6" >非银行金融机构</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="图片" prop="image">
+              <uploadImage
+                      :limit="1"
+                      :data="ruleForm.image"
+                      :url="`/files/financial/custom/upload`"
+                      @uploadSuccess="uploadSuccess"
+                      @remove="remove"
+              ></uploadImage>
+            </el-form-item>
+            <el-col :span="24" class="clickBtn">
+              <el-button @click="submitForm">提交</el-button>
+              <el-button @click="resetForm">取消</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  import uploadImage from '@/layout/custom/uploadImage.vue';
+  import WangEditor from '@/components/wang-editor.vue';
+
+  export default {
+    name: 'tCooperativeOrganizationForm',
+    props: {
+      ruleForm: null,
+      loading: null,
+    },
+    components: {
+      uploadImage, //图片
+      WangEditor, //富文本
+    },
+    data: () => ({
+      formTitle: '合作机构管理',
+      rules: {
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
+        type: [{ required: true, message: '请选择类型', trigger: 'change'  }],
+      },
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      submitForm() {
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
+      },
+      resetForm() {
+        this.$emit('resetForm');
+      },
+      uploadSuccess({ data }) {
+        this.$set(this.ruleForm, 'image', data.uri);
+      },
+      remove(file) {
+        this.$set(this.ruleForm, 'image', '')
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+  .form {
+    padding: 0 200px 0 0;
+  }
+
+  p {
+    padding: 0;
+    margin: 0;
+  }
+
+  .top .shu {
+    float: left;
+    width: 4px;
+    height: 20px;
+    background: rgba(233, 2, 29, 1);
+  }
+
+  .top .title {
+    float: left;
+    padding: 0 10px;
+    font-size: 16px;
+    font-family: Source Han Sans SC;
+    font-weight: bold;
+    color: rgba(40, 40, 40, 1);
+  }
+
+  /deep/ .el-textarea__inner {
+    min-height: 100px !important;
+  }
+
+  /deep/ .select {
+    width: 632px;
+  }
+
+  .selects {
+    width: 473px;
+    margin: 0 15px 0 0;
+  }
+
+  /deep/ .el-radio__input.is-checked + .el-radio__label {
+    color: #e9021d;
+  }
+
+  /deep/ .el-radio__input.is-checked .el-radio__inner {
+    border-color: #e9021d;
+    background: #e9021d;
+  }
+
+  /deep/ .el-checkbox__input.is-checked + .el-checkbox__label {
+    color: #e9021d;
+  }
+
+  /deep/ .el-checkbox__input.is-checked .el-checkbox__inner,
+  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+    background-color: #e9021d;
+    border-color: #e9021d;
+  }
+
+  /deep/ .el-checkbox-button,
+  .el-checkbox-button__inner {
+    margin: 0 15px 0 0;
+  }
+
+  /deep/ .el-checkbox-button__inner {
+    padding: 7px 5px;
+    border: 1px solid #ccc;
+    border-radius: 5px;
+  }
+
+  /deep/ .el-checkbox-button__inner:hover {
+    color: #e9021d;
+  }
+
+  /deep/ .el-checkbox-button:first-child .el-checkbox-button__inner {
+    border-left: 1px solid #ccc;
+    border-radius: 5px;
+  }
+
+  /deep/ .el-checkbox-button:last-child .el-checkbox-button__inner {
+    border-radius: 5px;
+  }
+
+  /deep/ .el-checkbox-button.is-checked .el-checkbox-button__inner {
+    color: #e9021d;
+    background-color: #ffffff;
+    border-color: #e9021d;
+  }
+
+  /deep/ .el-checkbox-button.is-checked .el-checkbox-button__inner {
+    box-shadow: none;
+  }
+
+  /deep/ .el-switch.is-checked .el-switch__core {
+    border-color: #e9021d;
+    background-color: #e9021d;
+  }
+
+  .clickBtn .el-button {
+    width: 100px;
+    height: 40px;
+    padding: 0;
+    color: #ffffff;
+    background: #b9b9b9;
+    border-radius: 4px;
+    margin: 40px;
+  }
+
+  .clickBtn {
+    text-align: center;
+    margin: 40px 0;
+    border-top: 1px solid #ccc;
+  }
+
+  .clickBtn .el-button:first-child {
+    background-color: #e9021d;
+  }
+</style>

+ 352 - 0
src/layout/tCooperativeOrganization/tCooperativeOrganizationList.vue

@@ -0,0 +1,352 @@
+<template>
+  <div id="tCooperativeOrganizationList">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="search">
+          <el-col :span="5">
+          <span>筛选条件:</span>
+          <el-select v-model="search.type" placeholder="请选择类型">
+            <el-option label="银行" value="1"></el-option>
+            <el-option label="担保" value="2"></el-option>
+            <el-option label="创投" value="3"></el-option>
+            <el-option label="协会" value="4"></el-option>
+            <el-option label="金融科技" value="5"></el-option>
+            <el-option label="非银行金融机构" value="6"></el-option>
+          </el-select>
+        </el-col>
+          <!--<el-col :span="4">
+            <span>输入条件:</span>
+            <el-input v-model="search.title" :placeholder="placeholder" class="input"></el-input>
+          </el-col>-->
+          <!--<el-col :span="7">
+            <span>时间选择:</span>
+            <el-date-picker v-model="search.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
+          </el-col>-->
+          <el-col :span="8">
+            <el-button class="btnSearch" @click="toQuery">查询</el-button>
+            <el-button class="btnSearch qing" @click="toClear">清空</el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24">
+          <el-table
+                  ref="tableData"
+                  :data="tableData"
+                  tooltip-effect="dark"
+                  :default-sort="{ prop: 'date', order: 'descending' }"
+                  style="width: 100%"
+                  @selection-change="handleSelectionChange"
+          >
+            <!--<el-table-column type="selection" align="center"> </el-table-column>-->
+            <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
+            <el-table-column label="类型" align="center">
+              <template slot-scope="scope">
+                <span>{{ getState(scope.row.type)}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="图片" align="center">
+              <template slot-scope="scope">
+                                <span> <el-image v-if="scope.row.image" :src="scope.row.image" style="height:20px;width:20px "
+                                                 @click="showImage(scope.row.image)"></el-image></span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" width="300px">
+              <template slot-scope="scope">
+                <!--<el-button size="mini" type="text" class="other" @click="updateState(scope.row,'-2')" v-if="scope.row.current_state === '0'">审核</el-button>
+                <el-button size="mini" type="text" class="other" @click="updateState(scope.row,'-1')">停用</el-button>-->
+                <el-button size="mini" type="text" class="edit" icon="el-icon-edit"
+                           @click="$router.push({ path: '/tCooperativeOrganization/detail', query: { id: scope.row.id } })"></el-button>
+                <el-button size="mini" type="text" class="delete" icon="el-icon-delete"
+                           @click.prevent="deleteRow(scope.row.id)"></el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-row>
+            <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page.sync="currentPage"
+                    :page-sizes="[10, 20, 30, 40]"
+                    :page-size.sync="limit"
+                    background
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+            >
+            </el-pagination>
+          </el-row>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog
+            :visible.sync="dialogVisible"
+            width="30%"
+    >
+      <el-image :src="elImage" style="height:100%;width:100% "></el-image>
+    </el-dialog>
+    <el-dialog title="审核意见" :visible.sync="dialogFormVisible" width="30%" @open="openDialog">
+      <el-input v-model="input" autocomplete="off" placeholder="请输入审核意见"></el-input>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="confirmClick">{{confirm}}</el-button>
+        <el-button @click="cancelClick">{{cancel}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'tCooperativeOrganizationList',
+    props: {
+      tableData: null,
+      total: null,
+    },
+    components: {},
+    data: () => ({
+      placeholder: '请输入标题',
+      search: {},
+      currentPage: 1,
+      limit: 10,
+      dialogVisible: false,
+      elImage: '',
+      tempId:'',
+      tempState:'',
+      dialogFormVisible: false,
+      input:'',
+      confirm:'确定',
+      cancel:'取消',
+    }),
+    created() {
+    },
+    computed: {
+    },
+    methods: {
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      deleteRow(id) {
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
+      },
+      handleSizeChange(val) {
+        this.$set(this, `currentPage`, 1);
+        this.$emit('select', {skip: 0, limit: val, ...this.search});
+      },
+      handleCurrentChange(val) {
+        this.$emit('select', {skip: (val - 1) * this.limit, limit: this.limit, ...this.search});
+      },
+      toQuery() {
+        this.$set(this, `currentPage`, 1);
+        this.$emit('select', {skip: 0, limit: this.limit, ...this.search});
+      },
+      toClear() {
+        let keys = Object.keys(this.search);
+        for (const key of keys) {
+          this.$set(this.search, `${key}`, '');
+        }
+      },
+      showImage(image) {
+        if(image){
+          this.$set(this, `elImage`, image);
+          this.$set(this, `dialogVisible`, true);
+        }else{
+          this.$set(this, `dialogVisible`, false);
+        }
+      },
+      getDate(val) {
+        if(val){
+          return this.format(new Date(Number(val)),'yyyy年MM月dd');
+        }
+        return '';
+      },
+      format(date,formatStr){
+        formatStr=formatStr.replace(/yyyy|YYYY/,date.getFullYear());
+        formatStr=formatStr.replace(/MM/,(date.getMonth()+1)>9?(date.getMonth()+1).toString():'0' + (date.getMonth()+1));
+        formatStr=formatStr.replace(/dd|DD/,date.getDate()>9?date.getDate().toString():'0' + date.getDate());
+        return formatStr;
+      },
+      publish(row){
+        if(row.publish_state === '1'){
+          this.$message.error('已发布');
+          return ;
+        }
+        this.$emit('publish', {row:row,skip: (this.currentPage - 1) * this.limit, limit: this.limit, ...this.search});
+  },
+      openDialog(){
+        this.$set(this, `input`, '');
+      },
+      confirmClick(){
+        this.$set(this, `dialogFormVisible`, false);
+        switch(this.tempState)
+        {
+          case '0':
+            break;
+          case '1':
+            break;
+          case '2':
+            break;
+          case '-1':
+            this.$emit('updateState', {id:this.tempId,state:this.tempState,result:this.input,skip: (this.currentPage - 1) * this.limit, limit: this.limit, ...this.search});
+            break;
+          case '-2':
+            this.$emit('updateState', {id:this.tempId,state:'1',result:this.input,skip: (this.currentPage - 1) * this.limit, limit: this.limit, ...this.search});
+            break;
+        }
+      },
+      cancelClick(){
+        this.$set(this, `dialogFormVisible`, false);
+        switch(this.tempState)
+        {
+          case '0':
+            break;
+          case '1':
+            break;
+          case '2':
+            break;
+          case '-1':
+            break;
+          case '-2':
+            this.$emit('updateState', {id:this.tempId,state:'2',result:this.input,skip: (this.currentPage - 1) * this.limit, limit: this.limit, ...this.search});
+            break;
+        }
+      },
+      updateState(row,state){
+        this.$set(this, `tempId`, row.id);
+        this.$set(this, `tempState`, state);
+        switch(state)
+        {
+          case '0':
+            break;
+          case '1':
+            break;
+          case '2':
+            break;
+          case '-1':
+            if(row.current_state === state){
+              this.$message.error('已停用');
+            }else{
+              this.$set(this, `confirm`, '停用');
+              this.$set(this, `cancel`, '取消');
+              this.$set(this, `dialogFormVisible`, true);
+            }
+            break;
+          case '-2':
+            this.$set(this, `confirm`, '审核通过');
+            this.$set(this, `cancel`, '审核拒绝');
+            this.$set(this, `dialogFormVisible`, true);
+            break;
+        }
+      },
+      getState(val) {
+        switch(val)
+        {
+          case '1':
+            return '银行';
+          case '2':
+            return '担保';
+          case '3':
+            return '创投';
+          case '4':
+            return '协会';
+          case '5':
+            return '金融科技';
+          case '6':
+            return '非银行金融机构';
+        }
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+  /deep/ .el-checkbox__input.is-checked .el-checkbox__inner {
+    background-color: red;
+    border-color: red;
+  }
+
+  /deep/ .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+    background-color: red;
+    border-color: red;
+  }
+
+  /deep/ .el-table th {
+    background-color: #f5f6fa;
+    padding: 8px 0;
+  }
+
+  /deep/ .el-table td {
+    padding: 11px 0;
+  }
+
+  .other {
+    color: #f36302;
+  }
+
+  .view {
+    color: #f36302;
+  }
+
+  .edit {
+    color: #2ccc02;
+  }
+
+  .delete {
+    color: #e9021d;
+  }
+
+  /deep/ .el-pagination {
+    padding: 26px 20px;
+  }
+
+  /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
+    background-color: red;
+  }
+
+  .input {
+    width: 150px;
+  }
+
+  /deep/ .el-input__inner {
+    height: 35px;
+    line-height: 35px;
+  }
+
+  .btnSearch {
+    width: 80px;
+    height: 34px;
+    background: rgba(233, 2, 29, 1);
+    border-radius: 4px;
+    padding: 0;
+    color: #fff;
+  }
+
+  .qing {
+    background: rgba(185, 185, 185, 1);
+  }
+
+  .top {
+    height: 50px;
+    margin: 0 0 10px 0;
+  }
+
+  .search {
+    background: #ffffff;
+    width: 97%;
+    height: 35px;
+    margin: 20px;
+    margin-left: 0px;
+  }
+
+  .list {
+    padding: 0 20px;
+  }
+</style>

+ 9 - 0
src/router/index.js

@@ -90,6 +90,15 @@ const routes = [
     path: '/zhidao/detail',
     component: () => import('../views/zhidao/detail.vue'),
   },
+  //合作机构
+  {
+    path: '/tCooperativeOrganization/index',
+    component: () => import('../views/tCooperativeOrganization/index.vue'),
+  },
+  {
+    path: '/tCooperativeOrganization/detail',
+    component: () => import('../views/tCooperativeOrganization/detail.vue'),
+  },
 
   // 企业信息管理-列表
   {

+ 2 - 0
src/store/index.js

@@ -12,6 +12,7 @@ import profession from './profession';
 import tDeclarationApproval from './tDeclarationApproval';
 import tDigitalService from './tDigitalService';
 import tFinancingExpert from './tFinancingExpert';
+import tCooperativeOrganization from './tCooperativeOrganization';
 import tGuidanceUnit from './tGuidanceUnit';
 import tInformationDelivery from './tInformationDelivery';
 import tNewsCenter from './tNewsCenter';
@@ -40,6 +41,7 @@ export default new Vuex.Store({
     tDigitalService,
     tFinancingExpert,
     tGuidanceUnit,
+    tCooperativeOrganization,
     tInformationDelivery,
     tNewsCenter,
     tPolicyInterpretation,

+ 38 - 0
src/store/tCooperativeOrganization.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+    characterInfo: `/api/financial/tCooperativeOrganization`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+    async query({ commit }, { skip = 0, limit, ...info } = {}) {
+        const res = await this.$axios.$get(`${api.characterInfo}`, { skip, limit, ...info });
+        return res;
+    },
+    async create({ commit }, payload) {
+        const res = await this.$axios.$post(`${api.characterInfo}`, payload);
+        return res;
+    },
+    async fetch({ commit }, payload) {
+        const res = await this.$axios.$get(`${api.characterInfo}/${payload}`);
+        return res;
+    },
+    async update({ commit }, { id, ...data }) {
+        const res = await this.$axios.$post(`${api.characterInfo}/update/${id}`, data);
+        return res;
+    },
+    async delete({ commit }, payload) {
+        const res = await this.$axios.$delete(`${api.characterInfo}/${payload}`);
+        return res;
+    },
+};
+export default {
+    namespaced: true,
+    state,
+    mutations,
+    actions,
+};

+ 99 - 0
src/views/tCooperativeOrganization/detail.vue

@@ -0,0 +1,99 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <detailTopInfo :topTitle="topTitle" :display="display" @goBack="goBack"></detailTopInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <tCooperativeOrganizationForm :ruleForm="ruleForm" @submitForm="submitForm" @resetForm="resetForm"></tCooperativeOrganizationForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  import detailTopInfo from '@/layout/custom/detailTopInfo.vue';
+  import tCooperativeOrganizationForm from '@/layout/tCooperativeOrganization/tCooperativeOrganizationForm.vue';
+  import { createNamespacedHelpers, mapGetters } from 'vuex';
+  const { mapActions: tCooperativeOrganization } = createNamespacedHelpers('tCooperativeOrganization');
+
+  export default {
+    name: 'detail',
+    props: {},
+    components: {
+      detailTopInfo, //头部导航
+      tCooperativeOrganizationForm,
+    },
+    data: () => ({
+      display: 'block',
+      topTitle: '合作机构管理',
+      ruleForm: {},
+      loading: true,
+    }),
+    created() {
+      this.select();
+    },
+    computed: {
+      id() {
+        return this.$route.query.id;
+      },
+    },
+    methods: {
+      ...tCooperativeOrganization(['create', 'delete', 'update', 'fetch', 'query']),
+      // 返回
+      goBack() {
+        this.$router.go(-1);
+      },
+      async select() {
+        if (this.id) {
+          const res = await this.fetch(this.id);
+          this.$set(this, `ruleForm`, res.data);
+        }
+      },
+      // 提交
+      async submitForm({ data }) {
+        if(!data.image){
+          this.$message.error('请上传图片');
+          return ;
+        }
+        let res;
+        if (this.id) {
+          res = await this.update(data);
+          if (res.errcode === 0) {
+            this.$message({
+              message: '信息修改成功',
+              type: 'success',
+            });
+          }
+        } else {
+          res = await this.create(data);
+          if (res.errcode === 0) {
+            this.$message({
+              message: '信息创建成功',
+              type: 'success',
+            });
+          }
+        }
+        if (this.$checkRes(res)) this.resetForm();
+      },
+      // 取消
+      resetForm() {
+        this.$router.push({ path: '/tCooperativeOrganization/index' });
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+  .top {
+    height: 50px;
+    margin: 0 0 10px 0;
+  }
+  .main {
+    min-height: 765px;
+    background: #ffffff;
+    padding: 20px;
+  }
+</style>

+ 106 - 0
src/views/tCooperativeOrganization/index.vue

@@ -0,0 +1,106 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle" :display="display" @add="add"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list">
+          <tCooperativeOrganizationList :tableData="tableData" :total="total" @deleteRow="deleteRow" @select="select" @updateState="updateState"></tCooperativeOrganizationList>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+  import topInfo from '@/layout/custom/topInfo.vue';
+  import tCooperativeOrganizationList from '@/layout/tCooperativeOrganization/tCooperativeOrganizationList.vue';
+  import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
+  const { mapActions: tCooperativeOrganization } = createNamespacedHelpers('tCooperativeOrganization');
+  const { mapActions: dictionary } = createNamespacedHelpers('dictionary');
+
+  export default {
+    name: 'index',
+    props: {},
+    components: {
+      topInfo, //头部导航
+      tCooperativeOrganizationList, //列表
+    },
+    data: () => ({
+      topTitle: '合作机构管理',
+      display: 'block',
+      tableData: [],
+      total: 0,
+    }),
+    created() {
+      this.select();
+    },
+    computed: {
+      ...mapState(['user']),
+    },
+    methods: {
+      ...tCooperativeOrganization(['create', 'delete', 'update', 'fetch', 'query']),
+      ...dictionary({dictQuery:'query'}),
+      async select({ skip = 0, limit = 10, ...info } = {}) {
+        const res = await this.query({ skip, limit, ...info });
+        if (this.$checkRes(res)) {
+          this.$set(this, `tableData`, res.data);
+          this.$set(this, `total`, res.total);
+        }
+      },
+      add() {
+        this.$router.push({ path: '/tCooperativeOrganization/detail' });
+      },
+      async deleteRow({ id, skip = 0, limit = 10, ...info } = {}) {
+        const res = await this.delete(id);
+        this.$checkRes(res, '删除成功', '删除失败');
+        this.select({ skip, limit, ...info });
+      },
+      async publish({ row ,skip = 0, limit = 10, ...info } = {}){
+        let res = await this.update({id:row.id,publish_state:1,publish_state_description:'已发布',publish_time:new Date().getTime()});
+        this.$checkRes(res, '发布成功', '发布失败');
+        this.select({ skip, limit, ...info });
+      },
+      async updateState({ id ,state ,result,skip = 0, limit = 10, ...info } = {}){
+        let res = null;
+        switch(state)
+        {
+          case '0':
+            break ;
+          case '1':
+            res = await this.state({id:id,current_approval_id:this.user.uid,state:state,state_description:'',result_description:result});
+            this.$checkRes(res, '审核成功', '审核失败');
+            break;
+          case '2':
+            res = await this.state({id:id,current_approval_id:this.user.uid,state:state,state_description:'',result_description:result});
+            this.$checkRes(res, '审核成功', '审核失败');
+            break;
+          case '-1':
+            res = await this.state({id:id,current_approval_id:this.user.uid,state:state,state_description:'',result_description:result});
+            this.$checkRes(res, '停用成功', '停用失败');
+            break;
+        }
+        this.select({ skip, limit, ...info });
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+  .top {
+    height: 50px;
+    margin: 0 0 10px 0;
+  }
+  .main {
+    min-height: 765px;
+    background: #ffffff;
+  }
+  .search {
+    width: 97%;
+    height: 35px;
+    margin: 20px;
+  }
+  .list {
+    padding: 0 20px;
+  }
+</style>