qymljy 2 years ago
parent
commit
9a460f055a

+ 31 - 5
src/HDrpManagement/prodectFileData/modules/add.vue

@@ -10,13 +10,20 @@
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
             <el-col :span="20">
-              <el-form-item prop="type"  label="档案名称:">
-                <el-input v-model="form.type" placeholder="输入档案名称"></el-input>
+              <el-form-item prop="type"  label="资料类别:">
+                <el-select v-model="form.type" placeholder="请选择">
+                  <el-option
+                      v-for="item in options"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="20">
-              <el-form-item  label="档案备注:">
-                <el-input type="textarea" autosize v-model="form.remarks" placeholder="输入档案备注"></el-input>
+              <el-form-item  label="资料说明:">
+                <el-input type="textarea" autosize v-model="form.remarks" placeholder="输入资料说明"></el-input>
               </el-form-item>
             </el-col>
           </el-form>
@@ -40,9 +47,10 @@ export default {
         type:'',
         remarks:''
       },
+      options: [],
       rules:{
         type: [
-          { required: true, message: '档案名称不可为空', trigger: 'blur' },
+          { required: true, message: '档案名称不可为空', trigger: 'change' },
         ],
       },
     }
@@ -50,6 +58,7 @@ export default {
   methods:{
     onShow() {
       this.drawer = true
+      this.typeDetails();
     },
     onClose() {
       this.form = {
@@ -73,6 +82,23 @@ export default {
           this.$emit('addSuccess')
         })
       })
+    },
+    /*资料类别明细*/
+    async typeDetails(){
+      const res = await this.$api.requested({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "technicalinfotype",
+          "parameter": {
+            "siteid": "YOSTEST2"
+          }
+        }
+      })
+      console.log(res)
+      this.options = res.data
     }
   }
 

+ 1 - 1
src/HDrpManagement/prodectFileData/modules/list.vue

@@ -37,7 +37,7 @@ export default {
       list:[],
       total:0,
       currentPage:0,
-      placeholder:'档案名称',
+      placeholder:'资料类别',
       params:{
         "id": "20220926095803",
         "version":1,

+ 1 - 1
src/HManagement/personalTarget/target/index.vue

@@ -8,7 +8,7 @@
         <el-button type="text" size="small" @click="$router.push({path:'/personalTarget_edit',query:{id:scope.data.sa_salestargetbillid,type:'onlyread'}})">详 情</el-button>
       </template>
       <template v-slot:edit="scope">
-        <el-button v-if="tool.checkAuth($route.name,'update')" class="inline-16" type="text" size="small" @click="$router.push({path:'/personalTarget_edit',query:{id:scope.data.sa_salestargetbillid}})">编 辑</el-button>
+        <el-button :disabled="scope.data.status === '已下达'" v-if="tool.checkAuth($route.name,'update')" class="inline-16" type="text" size="small" @click="$router.push({path:'/personalTarget_edit',query:{id:scope.data.sa_salestargetbillid}})">编 辑</el-button>
       </template>
       <template v-slot:issue="scope">
         <onissue v-if="tool.checkAuth($route.name,'issue')" :data="scope.data" @onSuccess="onSuccess"></onissue>

+ 1 - 1
src/HManagement/projectTarget/target/index.vue

@@ -8,7 +8,7 @@
         <el-button type="text" size="small" @click="$router.push({path:'/projectTarget_edit',query:{id:scope.data.sa_salestargetbillid,type:'onlyread'}})">详 情</el-button>
       </template>
       <template v-slot:edit="scope">
-        <el-button :disabled="scope.data.status === '已下达'" v-if="tool.checkAuth($route.name,'update')" class="inline-16" type="text" size="small" @click="$router.push({path:'/projectTarget_edit',query:{id:scope.data.sa_salestargetbillid}})">编 辑</el-button>
+        <el-button :disabled="scope.data.status === '已下达'"  v-if="tool.checkAuth($route.name,'update')" class="inline-16" type="text" size="small" @click="$router.push({path:'/projectTarget_edit',query:{id:scope.data.sa_salestargetbillid}})">编 辑</el-button>
       </template>
       <template v-slot:issue="scope">
         <onissue :data="scope.data" v-if="tool.checkAuth($route.name,'issue')" @onSuccess="onSuccess"></onissue>

+ 1 - 1
src/HManagement/salesForecastTemplate/index.vue

@@ -3,7 +3,7 @@
     <add v-if="tool.checkAuth($route.name,'insert')" @onSuccess="onSuccess"></add>
     <tepList ref="teplist" @tableRowClick="tableRowClick">
       <template v-slot:edit="scope">
-        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @onSuccess="onSuccess"></edit>
+        <edit  v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @onSuccess="onSuccess"></edit>
       </template>
       <template v-slot:del="scope">
         <ondel v-if="tool.checkAuth($route.name,'delete')" :data="scope.data" @onSuccess="onSuccess"></ondel>

+ 7 - 0
src/HManagement/salesForecastTemplate/modules/add.vue

@@ -15,6 +15,7 @@
               style="width:100%"
               v-model="form.begdate"
               type="date"
+              :picker-options="pickerOptions"
               value-format="yyyy-MM-dd"
               placeholder="选择日期">
             </el-date-picker>
@@ -26,6 +27,7 @@
                 style="width:100%"
                 v-model="form.enddate"
                 type="date"
+                :picker-options="pickerOptions"
                 value-format="yyyy-MM-dd"
                 placeholder="选择日期">
               </el-date-picker>
@@ -139,6 +141,11 @@ export default {
         roles: [
           { required: true, message: '请选择角色', trigger: 'change' }
         ],
+      },
+      pickerOptions:{
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 8.64e7;
+        }
       }
     }
   },

+ 1 - 1
src/HManagement/salesForecastTemplate/modules/del.vue

@@ -3,7 +3,7 @@
     <el-popconfirm
       title="确定删除吗?"
       @confirm="deleteRow">
-      <el-button size="small" type="text" slot="reference">删 除</el-button>
+      <el-button  size="small" type="text" slot="reference">删 除</el-button>
     </el-popconfirm>
   </div>
 </template>

+ 1 - 1
src/HManagement/salesForecastTemplate/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button type="text" size="small" @click="onShow(dialogFormVisible = true)">编 辑</el-button>
+    <el-button :disabled="data.status === '结束' " type="text" size="small" @click="onShow(dialogFormVisible = true)">编 辑</el-button>
     <el-dialog title="编辑模板" append-to-body :visible.sync="dialogFormVisible" width="800px">
       <el-row :gutter="20">
         <el-form :model="form" ref="form" :rules="rules" label-position="left" label-width="80px" size="small">

+ 1 - 1
src/HManagement/salesForecastTemplate/modules/release.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button type="text" size="mini" @click="releaseNotice">{{data.status === '新建'?'发 布':'取消发布'}}</el-button>
+    <el-button :disabled="data.status === '结束' " type="text" size="mini" @click="releaseNotice">{{data.status === '新建'?'发 布':'取消发布'}}</el-button>
   </div>
 </template>
 

+ 32 - 4
src/HManagement/salesForecastTemplate/modules/templateList.vue

@@ -26,10 +26,14 @@
         <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
       </template>
       <template v-slot:opreation="scope">
-        <slot v-if="scope.data.status === '新建'" name="edit" :data="scope.data"></slot>
-        <slot v-if="scope.data.status !== '结束'" name="release" :data="scope.data"></slot>
-        <slot v-if="scope.data.status === '新建'" name="del" :data="scope.data"></slot>
-        <slot v-if="scope.data.status === '发布'" name="finish" :data="scope.data"></slot>
+<!--        <slot v-if="scope.data.status === '新建'" name="edit" :data="scope.data"></slot>-->
+<!--        <slot v-if="scope.data.status !== '结束'" name="release" :data="scope.data"></slot>-->
+<!--        <slot v-if="scope.data.status === '新建'" name="del" :data="scope.data"></slot>-->
+<!--        <slot v-if="scope.data.status === '发布'" name="finish" :data="scope.data"></slot>-->
+        <slot v-if="scope.data.status === '新建' || scope.data.status === '结束'"  name="edit" :data="scope.data"></slot>
+        <slot   name="release" :data="scope.data"></slot>
+        <slot v-if="scope.data.status === '新建' || scope.data.status === '结束' "  name="del" :data="scope.data"></slot>
+        <slot v-if="scope.data.status === '发布' "  name="finish" :data="scope.data"></slot>
       </template>
     </tableLayout>
     <div style="margin-top:16px;text-align:right">
@@ -69,11 +73,24 @@ export default {
       list:[],
       total:0,
       currentPage:0,
+      lastDate:""
     }
   },
   methods:{
     async listData () {
       const res = await this.$api.requested(this.params)
+      console.log(res)
+      for (var i = 0;i<res.data.length;i++){
+        var date = new Date(res.data[i].enddate)
+        var nowDate = new Date()
+        if (date < nowDate){
+          if (res.data[i].status !='结束') {
+            // this.changeStatus(res.data[i].sa_salesforecastmodelid)
+            res.data[i].status = '结束'
+          }
+        }
+      }
+      console.log(res.data)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
@@ -91,6 +108,17 @@ export default {
     rowClick (row) {
       this.$emit('tableRowClick',row)
     },
+    async changeStatus(id){
+      console.log(id)
+      const res = await this.$api.requested({
+        "id": 20220906151103,
+        "version":1,
+        "content": {
+          "sa_salesforecastmodelids": [id]
+        }
+      })
+      console.log(res)
+    }
   },
   mounted () {
     this.listData()

+ 11 - 3
src/HManagement/siteManage/coderule/modules/edit.vue

@@ -3,12 +3,12 @@
     <el-button type="text" size="mini" @click="onShow">编 辑</el-button>
     <el-dialog title="编辑规则" :visible.sync="dialogFormVisible" width="500px">
       <el-form size="small" :model="form" label-position="left" label-width="140px">
+        <el-form-item label="编码名称">
+          <span >{{form.notes}}</span>
+        </el-form-item>
         <el-form-item label="前置符">
           <el-input v-model="form.fixed" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="时间格式">
-          <el-input v-model="form.timeformat" autocomplete="off"></el-input>
-        </el-form-item>
         <el-form-item label="数值长度">
           <el-input v-model="form.numlength" autocomplete="off"></el-input>
         </el-form-item>
@@ -16,6 +16,13 @@
           <!-- <el-input v-model="form.numincludetime" autocomplete="off"></el-input> -->
           <el-checkbox :true-label="1" :false-label="0" v-model="form.numincludetime"></el-checkbox>
         </el-form-item>
+        <el-form-item label="时间格式">
+          <el-input v-show="form.numincludetime === 1" v-model="form.timeformat" autocomplete="off"></el-input>
+          <span v-show="form.numincludetime !== 1">{{form.timeformat}}</span>
+        </el-form-item>
+        <el-form-item label="当前序号">
+          <span>{{form.serialnum}}</span>
+        </el-form-item>
       </el-form>
       <div class="dialog-footer">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
@@ -38,6 +45,7 @@ export default {
     onShow () {
       this.dialogFormVisible = true
       this.form = Object.assign({},this.form,this.data.data)
+      console.log(this.form)
     },
     async submit () {
       const res = await this.$api.requested({

+ 54 - 9
src/HManagement/siteManage/custom_option/index.vue

@@ -1,29 +1,74 @@
 <template>
-  <div>
-    <list ref="list">
-      <template v-slot:add="props">
-        <add :data="props.data" @onSuccess="onSuccess"></add>
-      </template>
-    </list>
+  <div >
+    <div class="container normal-panel el-row" >
+      <div class="borderRight el-col el-col-12">
+        <div class="container"></div>
+        <list ref="list" @rowShow="rowShow">
+        </list>
+      </div>
+      <div class="el-col el-col-12">
+        <div >
+          <add :disabled="disabled" :data="list" @addSuccess="onSuccess" style="margin-left: 2%"></add>
+        </div>
+        <div>
+          <details_list ref="listDetails" :id="optiontypeid">
+            <template v-slot:edit="scope">
+              <edit v-if="tool.checkAuth($route.name,'update')"  :data="scope.data" :classname="classname" @updateSuccess="onSuccess" :type="'text'" ></edit>
+              <el-divider direction="vertical"></el-divider>
+            </template>
+            <template v-slot:del="scope">
+              <del_option v-if="tool.checkAuth($route.name,'delete')"  :data="scope.data"   :type="'text'" @delSuccess="onSuccess" ></del_option>
+            </template>
+          </details_list>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
 import list from './modules/list.vue'
-import add from './modules/add.vue'
+import edit from './modules/edit'
+import del_option from './modules/delete'
+import details_list from './modules/detailsList'
+import add from './modules/add'
 export default {
+  data(){
+    return {
+      optiontypeid:'',
+      disabled:true,
+      list:[],
+      classname:''
+    }
+  },
   components:{
     list,
+    edit,
+    del_option,
+    details_list,
     add
   },
   methods:{
     onSuccess () {
-      let id = this.$refs['list'].optiontypeid
-      this.$refs['list'].queryoptionmx(id)
+     this.$refs.list.queryOptions()
+     this.$refs.listDetails.detailsList()
+    },
+    rowShow(row){
+      console.log(row)
+      this.optiontypeid = row.optiontypeid
+      console.log(this.optiontypeid)
+      this.disabled = false
+      this.list = row
+      console.log("列表信息")
+      console.log(this.list)
+      this.classname = row.remarks
     }
   }
 }
 
 </script>
 <style>
+  .borderRight{
+    border-right: 1px solid #ccc;;
+  }
 </style>

+ 42 - 20
src/HManagement/siteManage/custom_option/modules/add.vue

@@ -1,16 +1,30 @@
 <template>
-  <div>
-    <el-button size="small" @click="dialogVisible = true">添加自定义选项</el-button>
-    <el-dialog title="自定义选项" :visible.sync="dialogVisible" width="400px">
-      <el-form :model="form" ref="form" size="small" label-position="top">
-        <el-form-item label="选项名称" label-width="100px" prop="value" :rules="[
-          { required: true, message: '选项名称不能为空'}        ]">
-          <el-input v-model="form.value" autocomplete="off" placeholder="输入分类名称"></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="submit()" size="small">确 定</el-button>
+  <div class="inline-16">
+    <el-button type="primary" size="small" @click="show" class="el-icon-plus" :disabled="disabled"> 新增分类明细</el-button>
+    <el-dialog  :visible.sync="drawer" width="500px" >
+      <div slot="title" style="font-size: 15px">
+        自定义分类/
+        <el-tag size="mini" >{{data.remarks}}</el-tag>
+      </div>
+      <div>
+        <el-row :gutter="20">
+          <el-form :model="form"   ref="form"  size="mini" label-position="right" label-width="90px">
+            <el-col :span="20">
+              <el-form-item  label="值:">
+                <el-input type="textarea" autosize v-model="form.value" placeholder="输入值"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="20">
+              <el-form-item  label="描述:">
+                <el-input type="text" autosize v-model="form.remarks" placeholder="输入描述"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="close" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"   class="normal-btn-width btn-primary">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -18,12 +32,12 @@
 
 <script>
 export default {
-  props:["data"],
+  props:["data","disabled"],
   data () {
     return {
-      dialogVisible:false,
+      drawer:false,
       form:{
-        "optiontypeid": 0,
+        "optiontypeid": '',
         "optiontypemxid":0,
         "isused": "1",
         "value":"",
@@ -33,19 +47,27 @@ export default {
     }
   },
   methods:{
-    submit  () {
+    show(){
+      this.drawer = true
+      console.log("参数")
+      console.log(this.data)
+    },
+    onSubmit  () {
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         this.form.optiontypeid = this.data.optiontypeid
         const res = this.$api.requested({ "id": 20220901092601,content:this.form})
         this.tool.showMessage(res,()=>{
-          this.dialogVisible = false
-          this.$emit('onSuccess')
+          this.drawer = false
+          this.$emit('addSuccess')
         })
       });
-      
+    },
+    close() {
+      this.drawer = false
+      this.form.remarks = ''
     }
-  }
+  },
 }
 
 </script>

+ 38 - 0
src/HManagement/siteManage/custom_option/modules/delete.vue

@@ -0,0 +1,38 @@
+<template>
+  <div class="inline-16">
+    <el-popconfirm
+        title="确定删除此分类明细吗?"
+        @confirm="deleteRow()">
+      <el-button slot="reference" size="small" type="text" >删 除</el-button>
+    </el-popconfirm>
+  </div>
+
+</template>
+
+<script>
+export default {
+  name: "delete",
+  props:["data"],
+  mounted() {
+
+  },
+  methods:{
+    async deleteRow(){
+        console.log(this.data)
+        const res = await this.$api.requested({
+          "id":20220901092701,
+          "content": {
+            "optiontypemxid": this.data.optiontypemxid
+          }
+        })
+        this.tool.showMessage(res,() => {
+          this.$emit("delSuccess")
+        })
+      }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 103 - 0
src/HManagement/siteManage/custom_option/modules/detailsList.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="container normal-panel">
+    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght">
+      <template v-slot:customcol="scope">
+        <p>{{scope.column.data[scope.column.columnname]}}</p>
+      </template>
+      <template v-slot:opreation="scope">
+        <slot name="edit" :data="scope.data"></slot>
+        <slot name="del" :data="scope.data"></slot>
+      </template>
+    </tableLayout>
+    <div  style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="param.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "detailsList",
+  props:["id"],
+  data(){
+    return {
+      tableHieght:560,
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      // param:{
+      //   "classname": "sysmanage.develop.optiontype.optiontype",
+      //   "method": "optiontypeselect",
+      //   "content": {
+      //     "pageNumber": 1,
+      //     "pageSize": 20,
+      //     "typename": '',
+      //     "parameter": {
+      //       "siteid": "YOSTEST2"
+      //     }
+      //   }
+      // }
+      param:{
+        "pageNumber": 1,
+        "pageSize": 20,
+        "id": 20220901092501,
+        "content": {
+          "optiontypeid":''
+        }
+      }
+    }
+  },
+  methods:{
+    async detailsList(){
+      console.log("输出")
+      console.log(this.id)
+      this.param.content.optiontypeid = this.id
+      console.log(this.param.content.optiontypeid)
+      const res = await this.$api.requested(this.param)
+      console.log(res)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryOptions()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryOptions()
+    },
+  },
+  mounted() {
+
+  },
+  watch:{
+    id:function (val){
+      console.log("输出")
+      console.log(val)
+      if (val != ''){
+        this.detailsList()
+      }
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).optionDetailsTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 79 - 0
src/HManagement/siteManage/custom_option/modules/edit.vue

@@ -0,0 +1,79 @@
+<template>
+  <div class="inline-16">
+    <el-button size="small" type="text" @click="show">编 辑</el-button>
+    <el-dialog  :visible.sync="drawer" width="500px" >
+      <div slot="title" style="font-size: 15px">
+        自定义分类/
+        <el-tag size="mini" >{{classname}}</el-tag>
+      </div>
+      <div>
+        <el-row :gutter="20">
+          <el-form :model="form"   ref="form"  size="mini" label-position="right" label-width="90px">
+            <el-col :span="20">
+              <el-form-item  label="值:">
+                <el-input type="textarea" autosize v-model="form.value" placeholder="输入值"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="20">
+              <el-form-item  label="描述:">
+                <el-input type="text" autosize v-model="form.remarks" placeholder="输入描述"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="close" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"   class="normal-btn-width btn-primary">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+export default {
+  name: "edit",
+  props:["data","classname"],
+  data(){
+    return {
+      drawer:false,
+      form:{
+        optiontypeid: '',
+        optiontypemxid:'',
+        isused: "1",
+        value:'',
+        remarks:'',
+        sequence:2
+      }
+    }
+  },
+  methods:{
+    show(){
+      this.drawer = true
+      this.form.optiontypemxid = this.data.optiontypemxid
+      this.form.optiontypeid = this.data.optiontypeid
+      this.form.value = this.data.value
+      this.form.remarks = this.data.remarks
+
+    },
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = this.$api.requested({ "id": 20220901092601,content:this.form})
+        this.tool.showMessage(res,()=>{
+          this.drawer = false
+          this.$emit('updateSuccess')
+        })
+      });
+    },
+    close(){
+      this.drawer = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 59 - 68
src/HManagement/siteManage/custom_option/modules/list.vue

@@ -1,32 +1,10 @@
 <template>
-  <div class="container normal-panel">
-    <div class="flex-align-center">
-    </div>
-    <el-table
-      :data="list"
-      style="width: 100%"
-      border
-      :row-key='getRowKeys'
-      :expand-row-keys="expands"
-      @expand-change="handleExpandChange">
-      <el-table-column type="expand">
-        <template slot-scope="props">
-          <div class="container">
-            <el-tag style="margin:0 10px 10px 0" type="danger" v-for="item in optionmxlist" :key="item.index" @close="deleteRow(item)" closable>{{item.value}}</el-tag>
-            <slot name="add" :data="props.row"></slot>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="分类描述"
-        prop="remarks"
-        width="180">
-      </el-table-column>
-      <el-table-column
-        label="分类名称"
-        prop="typename">
-      </el-table-column>
-    </el-table>
+  <div class="container normal-panel" >
+    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght" @rowClick="rowShow">
+      <template v-slot:customcol="scope" >
+        <p>{{scope.column.data[scope.column.columnname]}}</p>
+      </template>
+    </tableLayout>
     <div style="margin-top:16px;text-align:right">
       <el-pagination
         background
@@ -43,6 +21,7 @@
 </template>
 
 <script>
+import add from './add'
 export default {
   data () {
     return {
@@ -50,27 +29,36 @@ export default {
         "id": 20220901092401,
         "content": {
           "pageNumber": 1,
-          "pageSize": 2,
+          "pageSize": 20,
           "where":{
             "condition":""
           }
         }
       },
+      tableHieght:560,
       tablecols:[],
-      optionmxlist:[],
-      expands: [],
+      // optionmxlist:[],
+      // expands: [],
       list:[],
       total:0,
       currentPage:0,
-      optiontypeid:0,
+      row:[]
+      // optiontypeid:0,
     }
   },
+  components:{
+    add
+  },
   methods:{
     async queryOptions () {
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      console.log(res)
+    },
+    rowShow(row){
+      this.$emit('rowShow',row)
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -82,45 +70,48 @@ export default {
       this.param.content.pageNumber = val
       this.queryOptions()
     },
-    async queryoptionmx (id) {
-      const res = await this.$api.requested({
-        "id": 20220901092501,
-        "content": {
-          "optiontypeid":id
-        }
-      })
-      this.optionmxlist = res.data
-    },
-    getRowKeys: function (row) {
-      return row.optiontypeid
-    },
-    handleExpandChange (row, expandedRows) {
-      var that = this
-      this.queryoptionmx(row.optiontypeid)
-      this.optiontypeid = row.optiontypeid
-      if (expandedRows.length) {
-        that.expands = []
-        if (row) {
-          that.expands.push(row.optiontypeid)
-        }
-      } else {
-        that.expands = []
-      }
-    },
-    async deleteRow (item) {
-      const res = await this.$api.requested({
-        "id":20220901092701,
-        "content": {
-            "optiontypemxid": item.optiontypemxid
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.queryoptionmx (this.optiontypeid)
-      })
-    }
+    // async queryoptionmx (id) {
+    //   const res = await this.$api.requested({
+    //     "id": 20220901092501,
+    //     "content": {
+    //       "optiontypeid":id
+    //     }
+    //   })
+    //   this.optionmxlist = res.data
+    // },
+    // getRowKeys: function (row) {
+    //   return row.optiontypeid
+    // },
+    // handleExpandChange (row, expandedRows) {
+    //   var that = this
+    //   this.queryoptionmx(row.optiontypeid)
+    //   this.optiontypeid = row.optiontypeid
+    //   if (expandedRows.length) {
+    //     that.expands = []
+    //     if (row) {
+    //       that.expands.push(row.optiontypeid)
+    //     }
+    //   } else {
+    //     that.expands = []
+    //   }
+    // },
+    // async deleteRow (item) {
+    //   const res = await this.$api.requested({
+    //     "id":20220901092701,
+    //     "content": {
+    //         "optiontypemxid": item.optiontypemxid
+    //     }
+    //   })
+    //   this.tool.showMessage(res,()=>{
+    //     this.queryoptionmx (this.optiontypeid)
+    //   })
+    // }
   },
   mounted () {
     this.queryOptions()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).optiontTable.tablecols
   }
 }