From 648520268c8878cd839e8560dc67af2c6e4d97cd Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 04 三月 2025 17:22:03 +0800
Subject: [PATCH] 修改文件管理bug

---
 src/components/Table/value-table.vue | 2047 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 1,025 insertions(+), 1,022 deletions(-)

diff --git a/src/components/Table/value-table.vue b/src/components/Table/value-table.vue
index 0998661..34561e0 100644
--- a/src/components/Table/value-table.vue
+++ b/src/components/Table/value-table.vue
@@ -1,242 +1,247 @@
 <style scoped>
-  .value-table {
-    width: 100%;
-    height: 100%;
-    overflow-y: auto;
-  }
+.value-table {
+  width: 100%;
+  height: 100%;
+  overflow-y: auto;
+}
 
-  .table {
-    width: 100%;
-    height: calc(100% - 42px);
-  }
+.table {
+  width: 100%;
+  height: calc(100% - 42px);
+}
 
-  .page {
-    width: 100%;
-    height: 30px;
-    text-align: right;
-    margin-top: 10px;
-  }
+.page {
+  width: 100%;
+  height: 30px;
+  text-align: right;
+  margin-top: 10px;
+}
 
-  .down-left {
-    width: 50%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
+.down-left {
+  width: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
-  .down-right {
-    width: 50%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
+.down-right {
+  width: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
-  .body {
-    overflow-x: hidden;
-  }
+.body {
+  overflow-x: hidden;
+}
 
-  .handleBtn {
-    border: none;
-    padding: 0;
-    color: #409EFF;
-    background: transparent;
-  }
+.handleBtn {
+  border: none;
+  padding: 0;
+  color: #409EFF;
+  background: transparent;
+}
 
-  .handleBtn:hover {
-    background: transparent;
-  }
+.handleBtn:hover {
+  background: transparent;
+}
 
-  .handleBtn.is-disabled {
-    color: #C0C4CC;
-  }
-  .red{
-    color: red !important;
-  }
-  >>>.el-loading-parent--relative {
-    z-index: 1 !important;
-  }
-  >>> .el-table__body-wrapper::-webkit-scrollbar {
-    height: 14px; /* 璁剧疆婊氬姩鏉″搴� */
-  }
+.handleBtn.is-disabled {
+  color: #C0C4CC;
+}
+
+.red {
+  color: red !important;
+}
+
+>>>.el-loading-parent--relative {
+  z-index: 1 !important;
+}
+
+>>>.el-table__body-wrapper::-webkit-scrollbar {
+  height: 14px;
+  /* 璁剧疆婊氬姩鏉″搴� */
+}
 </style>
 <style>
-  /* .value-table .highlight-warning-row-border td {
+/* .value-table .highlight-warning-row-border td {
 		border-top: 2px solid #ffcd29;
 		border-bottom: 2px solid #ffcd29;
 	} */
 
-  .value-table .highlight-warning-row-border td:first-child {
-    border-left: 4px solid #ffcd29;
-  }
+.value-table .highlight-warning-row-border td:first-child {
+  border-left: 4px solid #ffcd29;
+}
 
-  .value-table .highlight-warning-row-border td:last-child {
-    border-right: 4px solid #ffcd29;
-  }
+.value-table .highlight-warning-row-border td:last-child {
+  border-right: 4px solid #ffcd29;
+}
 
-  /* .value-table .highlight-danger-row-border td {
+/* .value-table .highlight-danger-row-border td {
 		border-top: 2px solid red;
 		border-bottom: 2px solid red;
 	} */
 
-  .value-table .highlight-danger-row-border td:first-child {
-    border-left: 4px solid #f56c6c;
-  }
+.value-table .highlight-danger-row-border td:first-child {
+  border-left: 4px solid #f56c6c;
+}
 
-  .value-table .highlight-danger-row-border td:last-child {
-    border-right: 4px solid #f56c6c;
-  }
+.value-table .highlight-danger-row-border td:last-child {
+  border-right: 4px solid #f56c6c;
+}
 
-  .value-table .el-upload {
-    width: 100%;
-  }
+.value-table .el-upload {
+  width: 100%;
+}
 
-  .value-table .el-upload-dragger {
-    width: 100%;
-  }
+.value-table .el-upload-dragger {
+  width: 100%;
+}
 
-  .value-table .handleBtn.is-disabled .el-upload:focus {
-    color: #C0C4CC !important;
-  }
+.value-table .handleBtn.is-disabled .el-upload:focus {
+  color: #C0C4CC !important;
+}
 
-  .value-table .avatar-uploader .el-upload {
-    height: 80px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
-  .el-table__empty-text{
-    text-align: left;
-    width: 100%;
-    display: inline-block;
-    margin-left: 200px;
-  }
+.value-table .avatar-uploader .el-upload {
+  height: 80px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
+.el-table__empty-text {
+  text-align: left;
+  width: 100%;
+  display: inline-block;
+  margin-left: 200px;
+}
 </style>
 
 <template>
   <div class="value-table">
-    <div :style="data.isPage!=undefined&&data.isPage!=true?'height:100%':''" class="table">
-      <el-table :key="specialKey" ref="eltable" v-loading="loading" :current-row-key="data.currentId" :data="tableData" :highlight-current-row="data.highlight===undefined||data.highlight"
-        :row-class-name="tableRowClassName" :row-key="record=>record[rowKey]" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" :span-method="spanMethod"
-        :summary-method="getSummaries"
-        height="100%" style="width: 100%;" tooltip-effect="dark"
-        @select="select" @selection-change="selectChange"
-        @sort-change="sortChange" @row-click="rowClick">
+    <div :style="data.isPage != undefined && data.isPage != true ? 'height:100%' : ''" class="table">
+      <el-table :key="specialKey" ref="eltable" v-loading="loading" :current-row-key="data.currentId" :data="tableData"
+        :highlight-current-row="data.highlight === undefined || data.highlight" :row-class-name="tableRowClassName"
+        :row-key="record => record[rowKey]" :show-summary="data.countFleid != undefined && data.countFleid.length > 0"
+        :span-method="spanMethod" :summary-method="getSummaries" height="100%" style="width: 100%;"
+        tooltip-effect="dark" @select="select" @selection-change="selectChange" @sort-change="sortChange"
+        @row-click="rowClick">
         <el-table-column v-if="data.showSelect" :key="Math.random()" :width="selectionWidth" type="selection">
         </el-table-column>
-        <el-table-column v-if="data.isIndex" :key="Math.random()" :width="selectionWidth" align="center" label="搴忓彿" type="index">
+        <el-table-column v-if="data.isIndex" :key="Math.random()" :width="selectionWidth" align="center" label="搴忓彿"
+          type="index">
         </el-table-column>
-        <el-table-column v-for="(a, ai) in tableHead" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))" :key="ai+'bbbbb'" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero"
-          :label="a.value" :min-width="columnMinWidth" :prop="a.label" :sortable="a.sort === 'custom' ? 'custom' : false" show-overflow-tooltip>
+        <el-table-column v-for="(a, ai) in tableHead"
+          v-if="!data.headNoShow || (data.headNoShow && data.headNoShow.length == 0) || (data.headNoShow && data.headNoShow.length > 0 && !data.headNoShow.find(d => d == a.label))"
+          :key="ai + 'bbbbb'" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero" :label="a.value"
+          :min-width="columnMinWidth" :prop="a.label" :sortable="a.sort === 'custom' ? 'custom' : false"
+          show-overflow-tooltip>
           <template slot-scope="scope">
             <div v-if="showType(a.label, data.tagField) != null">
-              <template v-if="typeof(scope.row[a.label]) == 'object'">
+              <template v-if="typeof (scope.row[a.label]) == 'object'">
                 <template v-for="(param, i) in scope.row[a.label]">
-                  <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-if="b.value == param" :key="bi+'cccc'"
-                    :type="b.type" size="medium" style="margin-right: 5px;">{{b.label}}</el-tag>
+                  <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-if="b.value == param" :key="bi + 'cccc'"
+                    :type="b.type" size="medium" style="margin-right: 5px;">{{ b.label }}</el-tag>
                 </template>
               </template>
               <template v-else>
-                <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-show="b.value == scope.row[a.label]" :key="bi+'ddddd'"
-                  :type="b.type" size="medium">{{b.label}}</el-tag>
+                <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-show="b.value == scope.row[a.label]"
+                  :key="bi + 'ddddd'" :type="b.type" size="medium">{{ b.label }}</el-tag>
               </template>
             </div>
             <!-- 鍙搷浣滆杩涜鐐瑰嚮浜嬩欢 -->
-            <span v-else-if="data.linkEvent&&showLink(a.label, data.linkEvent)" style="color:#409EFF;cursor: pointer;"
-              @click="handleLinkEvent(scope.row,data.linkEvent[a.label])">{{scope.row[a.label]}}</span>
-            <img v-else-if="showUpload(a.label)&&scope.row[a.label]" :src="javaApi+'/img/'+scope.row[a.label]"
-              alt="" style="width: 40px;height: 40px;margin-top: 10px;">
-            <span v-else :class="{red:getRedColor(a.label,scope.row)}" >{{scope.row[a.label]}}</span>
+            <span v-else-if="data.linkEvent && showLink(a.label, data.linkEvent)" style="color:#409EFF;cursor: pointer;"
+              @click="handleLinkEvent(scope.row, data.linkEvent[a.label])">{{ scope.row[a.label] }}</span>
+            <img v-else-if="showUpload(a.label) && scope.row[a.label]" :src="javaApi + '/img/' + scope.row[a.label]" alt=""
+              style="width: 40px;height: 40px;margin-top: 10px;">
+            <span v-else :class="{ red: getRedColor(a.label, scope.row) }">{{ scope.row[a.label] }}</span>
           </template>
         </el-table-column>
         <el-table-column v-if="data.do.length > 0" :width="getWidth()" align="center" fixed="right" label="鎿嶄綔">
           <template slot-scope="scope">
             <el-button v-for="(a, ai) in data.do" :key="ai
-            +'qqqq'" :disabled="a.disabFun ? a.disabFun(scope.row,scope.$index) : false"
-              :type="a.type" class="handleBtn"
-              @click="main(scope.row, a)">
-              <span v-if="a.type!='upload'">{{a.font}}</span>
-              <el-upload v-else ref='upload'
-                :accept='a.uploadConfig.accept' :action="javaApi+a.uploadConfig.url+'?id='+ (a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row) :  scope.row.id)"
-                :disabled="a.disabFun ? a.disabFun(scope.row,scope.$index) : false" :headers="token" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
-                name="file" style="background: transparent;">
-                <span>{{a.font}}</span>
+              + 'qqqq'" :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :type="a.type"
+              class="handleBtn" @click="main(scope.row, a)">
+              <span v-if="a.type != 'upload'">{{ a.font }}</span>
+              <el-upload v-else ref='upload' :accept='a.uploadConfig.accept'
+                :action="javaApi + a.uploadConfig.url + '?id=' + (a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row) : scope.row.id)"
+                :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :headers="token" :on-error="onError"
+                :on-success="handleSuccessUp" :show-file-list="false" name="file" style="background: transparent;">
+                <span>{{ a.font }}</span>
               </el-upload>
             </el-button>
           </template>
         </el-table-column>
       </el-table>
     </div>
-    <div v-if="data.isPage==undefined||data.isPage" class="page">
+    <div v-if="data.isPage == undefined || data.isPage" class="page">
       <el-pagination :current-page="page.current" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]"
         :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="sizeChange"
         @current-change="currentChange">
       </el-pagination>
     </div>
     <el-dialog :close-on-click-modal="false" :visible.sync="upDia"
-               :width="data.row==1?'500px':540+data.row * 200 + 'px'"
-               append-to-body title="缂栬緫">
+      :width="data.row == 1 ? '500px' : 540 + data.row * 200 + 'px'" append-to-body title="缂栬緫">
       <div class="body" style="max-height: 600px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
-          <div v-for="(a, ai) in upHead" :key="ai+'ffff'" style="line-height: 50px;">
-            <el-col :offset="1" :span="6/data.row" style="text-align: right;">
-              <span v-if="showUpReq(a.label)" class="required-span">* </span>{{a.value}}锛�
+          <div v-for="(a, ai) in upHead" :key="ai + 'ffff'" style="line-height: 50px;">
+            <el-col :offset="1" :span="6 / data.row" style="text-align: right;">
+              <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}锛�
             </el-col>
-            <el-col :span="16/data.row">
-              <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`璇疯緭鍏�${a.value}`"
-                clearable
+            <el-col :span="16 / data.row">
+              <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)"
+                v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`璇疯緭鍏�${a.value}`" clearable
                 size="small"></el-input>
-              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :allow-create="data.selectField[a.label].allowCreate"
-                         :default-first-option="data.selectField[a.label].defaultFirstOption"
-                         :disabled="isDisabled(a.label)"
-                :multiple="data.selectField[a.label].choose" clearable filterable
-                size="small" style="width: 100%;">
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'eeeee'" :label="b.label"
+              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]"
+                :allow-create="data.selectField[a.label].allowCreate"
+                :default-first-option="data.selectField[a.label].defaultFirstOption" :disabled="isDisabled(a.label)"
+                :multiple="data.selectField[a.label].choose" clearable filterable size="small" style="width: 100%;">
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'eeeee'" :label="b.label"
                   :value="b.value">
                 </el-option>
               </el-select>
-              <el-upload v-if="showUpload(a.label)" ref='upload'
-                :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false"
-                :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader"
-                name="file"
+              <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept'
+                :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError"
+                :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file"
                 style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;">
-                <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar"
+                <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar"
                   style="width: 80px;height: 80px;border-radius: 6px;">
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
-              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`璇烽�夋嫨${a.value}`"
-                :props="data.cascaderField.props" :show-all-levels="false" :value="upData[a.label]"
-                clearable filterable size="small"
-                style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader>
+              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree"
+                :placeholder="`璇烽�夋嫨${a.value}`" :props="data.cascaderField.props" :show-all-levels="false"
+                :value="upData[a.label]" clearable filterable size="small" style="width: 100%;"
+                @change="m => handleCascader(m, a.label)"></el-cascader>
             </el-col>
           </div>
         </div>
         <div v-else>
-          <el-row v-for="(a, ai) in upHead" :key="ai+'ggggg'" style="line-height: 50px;">
+          <el-row v-for="(a, ai) in upHead" :key="ai + 'ggggg'" style="line-height: 50px;">
             <el-col :span="6" style="text-align: right;">
-              <span v-if="showUpReq(a.label)" class="required-span">* </span>{{a.value}}锛�
+              <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}锛�
             </el-col>
             <el-col :offset="1" :span="16">
-              <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`璇疯緭鍏�${a.value}`"
-                clearable
+              <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)"
+                v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`璇疯緭鍏�${a.value}`" clearable
                 size="small"></el-input>
-              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :disabled="isDisabled(a.label)"
-                :multiple="data.selectField[a.label].choose" clearable filterable
+              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]"
+                :disabled="isDisabled(a.label)" :multiple="data.selectField[a.label].choose" clearable filterable
                 size="small" style="width: 100%;">
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'fffff'" :label="b.label"
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'fffff'" :label="b.label"
                   :value="b.value"></el-option>
               </el-select>
               <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept'
-                :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError"
-                :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file"
+                :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError"
+                :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file"
                 style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;">
-                <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar"
+                <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar"
                   style="width: 80px;height: 80px;border-radius: 6px;">
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
-              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`璇烽�夋嫨${a.value}`"
-                :props="data.cascaderField.props" :show-all-levels="false" :value="upData[a.label]" clearable
-                filterable size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader>
+              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree"
+                :placeholder="`璇烽�夋嫨${a.value}`" :props="data.cascaderField.props" :show-all-levels="false"
+                :value="upData[a.label]" clearable filterable size="small" style="width: 100%;"
+                @change="m => handleCascader(m, a.label)"></el-cascader>
             </el-col>
           </el-row>
         </div>
@@ -247,63 +252,60 @@
       </span>
     </el-dialog>
     <el-dialog :close-on-click-modal="false" :visible.sync="addDia"
-               :width="data.row==1?'500px':540+data.row * 200 + 'px'"
-               append-to-body title="鏂板">
+      :width="data.row == 1 ? '500px' : 540 + data.row * 200 + 'px'" append-to-body title="鏂板">
       <div v-if="addDia" class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
-          <div v-for="(a, ai) in upHead" :key="ai+'yyyyy'" style="line-height: 50px;">
-            <el-col :offset="1" :span="6/data.row" style="text-align: right;"><span v-if="showAddReq(a.label)"
+          <div v-for="(a, ai) in upHead" :key="ai + 'yyyyy'" style="line-height: 50px;">
+            <el-col :offset="1" :span="6 / data.row" style="text-align: right;"><span v-if="showAddReq(a.label)"
                 class="required-span">*
-              </span>{{a.value}}锛�</el-col>
-            <el-col :span="16/data.row">
-              <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :placeholder="`璇疯緭鍏�${a.value}`" clearable
-                size="small"></el-input>
-              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :multiple="data.selectField[a.label].choose"
-              :placeholder="`璇烽�夋嫨${a.value}`"
-                clearable filterable size="small" style="width: 100%;">
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'hhhh'" :label="b.label"
+              </span>{{ a.value }}锛�</el-col>
+            <el-col :span="16 / data.row">
+              <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)"
+                v-model="upData[a.label]" :placeholder="`璇疯緭鍏�${a.value}`" clearable size="small"></el-input>
+              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]"
+                :multiple="data.selectField[a.label].choose" :placeholder="`璇烽�夋嫨${a.value}`" clearable filterable
+                size="small" style="width: 100%;">
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'hhhh'" :label="b.label"
                   :value="b.value"></el-option>
               </el-select>
-              <el-upload v-if="showUpload(a.label)" ref='upload'
-                :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false"
-                :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader"
-                name="file"
+              <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept'
+                :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError"
+                :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file"
                 style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;">
-                <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar"
+                <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar"
                   style="width: 80px;height: 80px;border-radius: 6px;">
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
-              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`璇烽�夋嫨${a.value}`"
-                :props="data.cascaderField.props" :show-all-levels="false" clearable filterable
-                size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader>
+              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree"
+                :placeholder="`璇烽�夋嫨${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" clearable
+                filterable size="small" style="width: 100%;" @change="m => handleCascader(m, a.label)"></el-cascader>
             </el-col>
           </div>
         </div>
         <div v-else>
-          <el-row v-for="(a, ai) in upHead" :key="ai+'jjjjj'" style="line-height: 50px;">
+          <el-row v-for="(a, ai) in upHead" :key="ai + 'jjjjj'" style="line-height: 50px;">
             <el-col :span="6" style="text-align: right;"><span v-if="showAddReq(a.label)" class="required-span">*
-              </span>{{a.value}}锛�</el-col>
+              </span>{{ a.value }}锛�</el-col>
             <el-col :offset="1" :span="16">
-              <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :placeholder="`璇疯緭鍏�${a.value}`" clearable
-                size="small"></el-input>
-              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :multiple="data.selectField[a.label].choose"
-              :placeholder="`璇烽�夋嫨${a.value}`"
-                clearable size="small" style="width: 100%;">
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'mmmmmm'" :label="b.label"
+              <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)"
+                v-model="upData[a.label]" :placeholder="`璇疯緭鍏�${a.value}`" clearable size="small"></el-input>
+              <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]"
+                :multiple="data.selectField[a.label].choose" :placeholder="`璇烽�夋嫨${a.value}`" clearable size="small"
+                style="width: 100%;">
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'mmmmmm'" :label="b.label"
                   :value="b.value"></el-option>
               </el-select>
-              <el-upload v-if="showUpload(a.label)" ref='upload'
-                :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false"
-                :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader"
-                name="file"
+              <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept'
+                :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError"
+                :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file"
                 style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;">
-                <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar"
+                <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar"
                   style="width: 80px;height: 80px;border-radius: 6px;">
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
-              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`璇烽�夋嫨${a.value}`"
-                :props="data.cascaderField.props" :show-all-levels="false" clearable filterable
-                size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader>
+              <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree"
+                :placeholder="`璇烽�夋嫨${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" clearable
+                filterable size="small" style="width: 100%;" @change="m => handleCascader(m, a.label)"></el-cascader>
             </el-col>
           </el-row>
         </div>
@@ -325,9 +327,9 @@
     </el-dialog>
     <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px">
       <div style="margin: 0 auto;">
-        <el-upload ref="upload" :accept="data.accept===undefined?'.csv':data.accept" :action="javaApi + inputUrl" :auto-upload="false" :data="{param: data.uploadStr}" :file-list="fileList"
-          :headers="token" :limit="1" :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess"
-          drag name="file">
+        <el-upload ref="upload" :accept="data.accept === undefined ? '.csv' : data.accept" :action="javaApi + inputUrl"
+          :auto-upload="false" :data="{ param: data.uploadStr }" :file-list="fileList" :headers="token" :limit="1"
+          :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" drag name="file">
           <i class="el-icon-upload"></i>
           <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
         </el-upload>
@@ -341,98 +343,57 @@
 </template>
 
 <script>
-  export default {
-    props: {
-      selectionWidth: {
-        type: String,
-        default: () => '65'
-      },
-      columnMinWidth: {
-        type: String,
-        default: () => '155'
-      },
-      isColumnWidth: {
-        type: Boolean,
-        default: () => false
-      },
-      isShowZero: {
-        type: Boolean,
-        default: () => false
-      },
-      tableRowClassName: {
-        type: Function
-      },
-      rowKey: {
-        type: String,
-        default: ()=>{
-          return 'id'
-        }
-      },
-      url: {
-        type: String,
-        default: () => null
-      },
-      upUrl: {
-        type: String,
-        default: () => null
-      },
-      delUrl: {
-        type: String,
-        default: () => null
-      },
-      downUrl: {
-        type: String,
-        default: () => null
-      },
-      inputUrl: {
-        type: String,
-        default: () => null
-      },
-      componentData: {
-        type: Object,
-        default: () => {
-          return {
-            entity: {
-              orderBy: {
-                field: 'id',
-                order: 'asc'
-              }
-            },
-            isIndex: false,
-            showSelect: false,
-            select: true,
-            row: 1,
-            do: [{
-              id: 'update',
-              font: '缂栬緫',
-              type: 'text',
-              method: 'doDiy'
-            }, {
-              id: 'delete',
-              font: '鍒犻櫎',
-              type: 'text',
-              method: 'doDiy'
-            }],
-            doDiy: true,
-            tagField: [{
-              label: 'state',
-              select: [{
-                value: '1',
-                type: 'success',
-                label: '鍚敤'
-              }, {
-                value: '0',
-                type: 'danger',
-                label: '鍋滅敤'
-              }]
-            }]
-          }
-        }
+export default {
+  props: {
+    selectionWidth: {
+      type: String,
+      default: () => '65'
+    },
+    columnMinWidth: {
+      type: String,
+      default: () => '155'
+    },
+    isColumnWidth: {
+      type: Boolean,
+      default: () => false
+    },
+    isShowZero: {
+      type: Boolean,
+      default: () => false
+    },
+    tableRowClassName: {
+      type: Function
+    },
+    rowKey: {
+      type: String,
+      default: () => {
+        return 'id'
       }
     },
-    data() {
-      return {
-        data: {
+    url: {
+      type: String,
+      default: () => null
+    },
+    upUrl: {
+      type: String,
+      default: () => null
+    },
+    delUrl: {
+      type: String,
+      default: () => null
+    },
+    downUrl: {
+      type: String,
+      default: () => null
+    },
+    inputUrl: {
+      type: String,
+      default: () => null
+    },
+    componentData: {
+      type: Object,
+      default: () => {
+        return {
           entity: {
             orderBy: {
               field: 'id',
@@ -443,795 +404,837 @@
           showSelect: false,
           select: true,
           row: 1,
-          isPage: true, //
           do: [{
+            id: 'update',
+            font: '缂栬緫',
+            type: 'text',
+            method: 'doDiy'
+          }, {
+            id: 'delete',
             font: '鍒犻櫎',
-            type: 'text'
+            type: 'text',
+            method: 'doDiy'
           }],
-          type: [],
-          uploadStr: "",
-          currentId: '', //褰撳墠楂樹寒鐨処D
-        },
-        tableHead: [],
-        tableData: [],
-        multipleSelection: [],
-        user: {},
-        page: {
-          current: 1,
-          size: 20,
-        },
-        total: 0,
-        loading: false,
-        upDia: false,
-        upData: {},
-        upHead: [],
-        upLoad: false,
-        addDia: false,
-        addUrl: null,
-        addLoad: false,
-        dataCopy: {},
-        downDia: false,
-        uploadDia: false,
-        token: null,
-        fileList: [],
-        init: true,
-        spanList: [
-          // {
-          //   arr:[],
-          //   position:0
-          // }
-        ],
-        specialSpanList: [
-          // {
-          //   arr:[],
-          //   position:0
-          // }
-        ],
-        param: {},
-        specialKey:'table-'
+          doDiy: true,
+          tagField: [{
+            label: 'state',
+            select: [{
+              value: '1',
+              type: 'success',
+              label: '鍚敤'
+            }, {
+              value: '0',
+              type: 'danger',
+              label: '鍋滅敤'
+            }]
+          }]
+        }
       }
-    },
-    beforeUpdate() {
-      this.$nextTick(() => {
-        this.$refs.eltable.doLayout()
-      })
-    },
-    mounted() {
-      this.data = this.componentData
-      this.dataCopy = this.HaveJson(this.componentData)
-      if (this.data.init === undefined || this.data.init === true) {
-        this.selectList()
-      }
-      this.token = {
-        'token': sessionStorage.getItem('token')
-      }
-      this.specialKey = this.specialKey+Math.random()*100;
-    },
-    methods: {
-      rowspan(spanArr, position, spanName) {
-        this.tableData.forEach((item, index) => {
-          if (index === 0) {
-            spanArr.push(1);
-            position = 0;
-          } else {
-            if (
-              this.tableData[index][spanName] ===
-              this.tableData[index - 1][spanName]
-            ) {
-              spanArr[position] += 1;
-              spanArr.push(0);
-            } else {
-              spanArr.push(1);
-              position = index;
-            }
+    }
+  },
+  data() {
+    return {
+      data: {
+        entity: {
+          orderBy: {
+            field: 'id',
+            order: 'asc'
           }
-        });
+        },
+        isIndex: false,
+        showSelect: false,
+        select: true,
+        row: 1,
+        isPage: true, //
+        do: [{
+          font: '鍒犻櫎',
+          type: 'text'
+        }],
+        type: [],
+        uploadStr: "",
+        currentId: '', //褰撳墠楂樹寒鐨処D
       },
-      spanMethod({
-        row,
-        column,
-        rowIndex,
-        columnIndex
-      }) {
-        // 涓�鑸殑鍚堝苟琛�
-        if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > 0) {
-          let i = null;
-          let obj = this.data.spanConfig.rows.find((item, index) => {
-            i = index;
-            return item.index == columnIndex
-          })
-          if (obj) {
-            const _row = this.spanList[i].arr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-              rowspan: _row,
-              colspan: _col,
-            };
+      tableHead: [],
+      tableData: [],
+      multipleSelection: [],
+      user: {},
+      page: {
+        current: 1,
+        size: 20,
+      },
+      total: 0,
+      loading: false,
+      upDia: false,
+      upData: {},
+      upHead: [],
+      upLoad: false,
+      addDia: false,
+      addUrl: null,
+      addLoad: false,
+      dataCopy: {},
+      downDia: false,
+      uploadDia: false,
+      token: null,
+      fileList: [],
+      init: true,
+      spanList: [
+        // {
+        //   arr:[],
+        //   position:0
+        // }
+      ],
+      specialSpanList: [
+        // {
+        //   arr:[],
+        //   position:0
+        // }
+      ],
+      param: {},
+      specialKey: 'table-'
+    }
+  },
+  beforeUpdate() {
+    this.$nextTick(() => {
+      this.$refs.eltable.doLayout()
+    })
+  },
+  mounted() {
+    this.data = this.componentData
+    this.dataCopy = this.HaveJson(this.componentData)
+    if (this.data.init === undefined || this.data.init === true) {
+      this.selectList()
+    }
+    this.token = {
+      'token': sessionStorage.getItem('token')
+    }
+    this.specialKey = this.specialKey + Math.random() * 100;
+  },
+  methods: {
+    rowspan(spanArr, position, spanName) {
+      this.tableData.forEach((item, index) => {
+        if (index === 0) {
+          spanArr.push(1);
+          position = 0;
+        } else {
+          if (
+            this.tableData[index][spanName] ===
+            this.tableData[index - 1][spanName]
+          ) {
+            spanArr[position] += 1;
+            spanArr.push(0);
+          } else {
+            spanArr.push(1);
+            position = index;
           }
+        }
+      });
+    },
+    spanMethod({
+      row,
+      column,
+      rowIndex,
+      columnIndex
+    }) {
+      // 涓�鑸殑鍚堝苟琛�
+      if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > 0) {
+        let i = null;
+        let obj = this.data.spanConfig.rows.find((item, index) => {
+          i = index;
+          return item.index == columnIndex
+        })
+        if (obj) {
+          const _row = this.spanList[i].arr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col,
+          };
+        }
+      }
+      // 鐗规畩鐨勫悎骞惰
+      if (this.data.spanConfig != undefined && this.data.spanConfig.special && this.data.spanConfig.special.main &&
+        this.data.spanConfig.special.rows && this.data.spanConfig.special.rows.length > 0) {
+        let i = null;
+        let obj = this.data.spanConfig.special.rows.find((item, index) => {
+          i = index;
+          return item.index == columnIndex
+        })
+        if (obj) {
+          const _row = this.specialSpanList[i].arr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col,
+          };
+        }
+      }
+    },
+    selectChange(val) {
+      if (this.data.select) {
+        this.multipleSelection = val;
+      } else {
+        this.multipleSelection = val[val.length - 1];
+      }
+      if (this.data.selectMethod != undefined) {
+        if (this.$parent.$el.className.indexOf('el-') == 0) {
+          this.$parent.$parent[this.data.selectMethod](val)
+        } else {
+          this.$parent[this.data.selectMethod](val)
+        }
+      }
+    },
+    select(val, row) {
+      if (!this.data.select) {
+        this.$refs['eltable'].clearSelection()
+        this.$refs['eltable'].toggleRowSelection(row, true)
+      }
+    },
+    rowClick(row, column, event) {
+      if (this.data.select) {
+        this.$refs['eltable'].toggleRowSelection(row)
+      } else {
+        this.$refs['eltable'].clearSelection()
+        this.$refs['eltable'].toggleRowSelection(row, true)
+      }
+    },
+    sizeChange(val) {
+      this.page.size = val
+      this.selectList('page')
+    },
+    currentChange(val) {
+      this.page.current = val
+      this.selectList('page')
+    },
+    // 璋冨彇琛ㄦ牸鏌ヨ鎺ュ彛
+    selectList(val) {
+      // console.log('val---', val)
+      // console.log('this.page---', this.page)
+      // this.loading = true
+      if (val === undefined) {
+        this.page.current = 1;
+      }
+      if (val === 'lastPage') {
+        this.page.current = this.page.current - 1 // 渚嬪鍒犻櫎鏈〉鏈�鍚庝竴鏉℃暟鎹紝灏嗗綋鍓嶉〉闈㈠畾涓轰笂涓�椤碉紝闄ょ涓�椤靛
+      }
+      // 涓嶈鍒嗛〉灏卞叏鏌�
+      if (this.data.isPage != undefined && this.data.isPage != true) {
+        this.page = {
+          current: -1,
+          size: -1,
+        }
+      }
+      this.$axios.post(this.url, {
+        page: this.page,
+        entity: this.data.entity
+      }, {
+        headers: {
+          'Content-Type': 'application/json'
+        }
+      }).then(res => {
+        if (res.code === 201) {
+          this.loading = false
+          return
+        }
+        this.total = res.data.body.total
+        this.tableHead = res.data.head
+        this.tableData = res.data.body.records
+        if (this.data.needSort !== undefined) {
+          // 鏍规嵁鐖剁粍浠朵紶鍥炴潵鐨刵eedSort鏁扮粍锛屽垽鏂摢浜涘瓧娈甸渶瑕佹帓搴忓姛鑳�
+          for (var i = 0; i < this.data.needSort.length; i++) {
+            this.tableHead.forEach(item => {
+              if (item.label === this.data.needSort[i]) {
+                item.sort = 'custom'
+              }
+            })
+          }
+        }
+        if (this.isShowZero) {
+          // 宸ユ椂绠$悊-宸ユ椂缁熻娌℃湁鏃堕棿鐨勫氨灞曠ず0
+          this.tableData.map(item => {
+            Object.keys(item).forEach(val => {
+              if (item[val] === null && (val.includes('Hours') || val === 'total')) {
+                item[val] = 0
+              }
+            })
+          })
+        }
+        if (this.tableData.length === 0 && this.page.current > 1) {
+          this.selectList('lastPage')
+        }
+        // if (this.isColumnWidth) {
+        //   this.tableHead.forEach(item => {
+        //     if(!item.width){
+        //       if (item.value.length === 4) {
+        //         item.width = 120
+        //       } else if (item.value.length === 3){
+        //         item.width = item.label.includes('Hours') ? 50 : 100
+        //       } else if (item.value.length === 5){
+        //         item.width = 130
+        //       } else if (item.value.length === 7){
+        //         item.width = 160
+        //       } else if (item.value.length === 6){
+        //         item.width = 150
+        //       }  else if (item.value.length === 2){
+        //         item.width = item.label.includes('Hours') ? 52 : 86
+        //       } else {
+        //         item.width = item.label.includes('Hours') ? 46 : 86
+        //       }
+        //     }
+        //   })
+        // }
+
+        // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
+        for (var a in this.data.selectField) {
+          if (this.data.selectField[a].choose == true) {
+            this.tableData.map(b => {
+              try {
+                b[a] = JSON.parse(b[a])
+              } catch (e) { }
+            })
+          }
+        }
+        // 涓�鑸殑鍚堝苟琛�
+        if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length >
+          0) {
+          this.spanList = [];
+          this.data.spanConfig.rows.forEach((item, index) => {
+            this.spanList.push({
+              arr: [],
+              position: 0
+            })
+            this.rowspan(this.spanList[index].arr, this.spanList[index].position, item.name);
+          })
         }
         // 鐗规畩鐨勫悎骞惰
-        if (this.data.spanConfig != undefined && this.data.spanConfig.special && this.data.spanConfig.special.main &&
-          this.data.spanConfig.special.rows && this.data.spanConfig.special.rows.length > 0) {
-          let i = null;
-          let obj = this.data.spanConfig.special.rows.find((item, index) => {
-            i = index;
-            return item.index == columnIndex
+        if (this.data.spanConfig != undefined && this.data.spanConfig.special && this.data.spanConfig.special
+          .main && this.data.spanConfig.special.rows && this.data.spanConfig.special.rows.length > 0) {
+          this.specialSpanList = []
+          this.data.spanConfig.special.rows.forEach((item, index) => {
+            this.specialSpanList.push({
+              arr: [],
+              position: 0
+            })
+            this.rowspan(this.specialSpanList[index].arr, this.specialSpanList[index].position, this.data
+              .spanConfig.special.main);
           })
-          if (obj) {
-            const _row = this.specialSpanList[i].arr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-              rowspan: _row,
-              colspan: _col,
-            };
-          }
         }
-      },
-      selectChange(val) {
-        if (this.data.select) {
-          this.multipleSelection = val;
-        } else {
-          this.multipleSelection = val[val.length - 1];
+        this.loading = false
+      }).catch(e => {
+        console.log('璇峰埛鏂伴〉闈㈠啀灏濊瘯---', e)
+        this.loading = false
+        this.$message.error('璇峰埛鏂伴〉闈㈠啀灏濊瘯')
+      })
+    },
+    sortChange(ob) {
+      this.data.entity.orderBy = {}
+      this.data.entity.orderBy.field = ob.prop
+      if (ob.order == 'ascending') {
+        this.data.entity.orderBy.order = 'asc'
+      } else if (ob.order == 'descending') {
+        this.data.entity.orderBy.order = 'desc'
+      } else {
+        if (this.componentData.entity.orderBy != undefined) {
+          this.data.entity.orderBy = this.HaveJson(this.dataCopy.entity.orderBy)
         }
-        if (this.data.selectMethod != undefined) {
-          if (this.$parent.$el.className.indexOf('el-') == 0) {
-            this.$parent.$parent[this.data.selectMethod](val)
-          } else {
-            this.$parent[this.data.selectMethod](val)
-          }
+      }
+      this.selectList()
+    },
+    // 灞曠ずtag
+    showType(val, ob) {
+      var str = ob[val]
+      return str == undefined ? null : ob[val].select
+    },
+    // 灞曠ず鎿嶄綔鏍�
+    showLink(val, ob) {
+      var str = ob[val]
+      return str == undefined ? null : ob[val].method
+    },
+    showAddReq(label) {
+      if (this.data.requiredAdd == undefined) {
+        return
+      }
+      for (var i = 0; i < this.data.requiredAdd.length; i++) {
+        if (label == this.data.requiredAdd[i]) {
+          return true
         }
-      },
-      select(val, row) {
-        if (!this.data.select) {
-          this.$refs['eltable'].clearSelection()
-          this.$refs['eltable'].toggleRowSelection(row, true)
+      }
+      return false
+    },
+    showUpReq(label) {
+      if (this.data.requiredUp == undefined) {
+        return
+      }
+      for (var i = 0; i < this.data.requiredUp.length; i++) {
+        if (label == this.data.requiredUp[i]) {
+          return true
         }
-      },
-      rowClick(row, column, event) {
-        if (this.data.select) {
-          this.$refs['eltable'].toggleRowSelection(row)
-        } else {
-          this.$refs['eltable'].clearSelection()
-          this.$refs['eltable'].toggleRowSelection(row, true)
+      }
+      return false
+    },
+    showUpload(label) {
+      if (this.data.addUpload && this.data.addUpload.find(m => m == label)) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    showCascader(label) {
+      if (this.data.cascaderField && this.data.cascaderField[label]) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    handleTree(arr, value) {
+      let label = ''
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i].id == value) {
+          label = arr[i].name
+          return label
+        } else if (arr[i].children) {
+          label = this.handleTree(arr[i].children, value)
         }
-      },
-      sizeChange(val) {
-        this.page.size = val
-        this.selectList('page')
-      },
-      currentChange(val) {
-        this.page.current = val
-        this.selectList('page')
-      },
-      // 璋冨彇琛ㄦ牸鏌ヨ鎺ュ彛
-      selectList(val) {
-        // console.log('val---', val)
-        // console.log('this.page---', this.page)
-        // this.loading = true
-        if(val===undefined){
-          this.page.current = 1;
-        }
-        if (val === 'lastPage') {
-          this.page.current = this.page.current - 1 // 渚嬪鍒犻櫎鏈〉鏈�鍚庝竴鏉℃暟鎹紝灏嗗綋鍓嶉〉闈㈠畾涓轰笂涓�椤碉紝闄ょ涓�椤靛
-        }
-        // 涓嶈鍒嗛〉灏卞叏鏌�
-        if (this.data.isPage != undefined && this.data.isPage != true) {
-          this.page = {
-            current: -1,
-            size: -1,
-          }
-        }
-        this.$axios.post(this.url, {
-          page: this.page,
-          entity: this.data.entity
-        }, {
-          headers: {
-            'Content-Type': 'application/json'
-          }
-        }).then(res => {
-          if (res.code === 201) {
-            this.loading = false
-            return
-          }
-          this.total = res.data.body.total
-          this.tableHead = res.data.head
-          this.tableData = res.data.body.records
-          if (this.data.needSort !== undefined) {
-            // 鏍规嵁鐖剁粍浠朵紶鍥炴潵鐨刵eedSort鏁扮粍锛屽垽鏂摢浜涘瓧娈甸渶瑕佹帓搴忓姛鑳�
-            for (var i = 0; i < this.data.needSort.length; i++) {
-              this.tableHead.forEach(item => {
-                if (item.label === this.data.needSort[i]) {
-                  item.sort = 'custom'
-                }
-              })
-            }
-          }
-          if (this.isShowZero) {
-            // 宸ユ椂绠$悊-宸ユ椂缁熻娌℃湁鏃堕棿鐨勫氨灞曠ず0
-            this.tableData.map(item => {
-              Object.keys(item).forEach(val => {
-                if (item[val] === null && (val.includes('Hours') || val === 'total')) {
-                  item[val] = 0
-                }
-              })
-            })
-          }
-          if (this.tableData.length === 0 && this.page.current > 1) {
-            this.selectList('lastPage')
-          }
-          // if (this.isColumnWidth) {
-          //   this.tableHead.forEach(item => {
-          //     if(!item.width){
-          //       if (item.value.length === 4) {
-          //         item.width = 120
-          //       } else if (item.value.length === 3){
-          //         item.width = item.label.includes('Hours') ? 50 : 100
-          //       } else if (item.value.length === 5){
-          //         item.width = 130
-          //       } else if (item.value.length === 7){
-          //         item.width = 160
-          //       } else if (item.value.length === 6){
-          //         item.width = 150
-          //       }  else if (item.value.length === 2){
-          //         item.width = item.label.includes('Hours') ? 52 : 86
-          //       } else {
-          //         item.width = item.label.includes('Hours') ? 46 : 86
-          //       }
-          //     }
-          //   })
-          // }
-
-          // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
-          for (var a in this.data.selectField) {
-            if (this.data.selectField[a].choose == true) {
-              this.tableData.map(b => {
-                try {
-                  b[a] = JSON.parse(b[a])
-                } catch (e) {}
-              })
-            }
-          }
-          // 涓�鑸殑鍚堝苟琛�
-          if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length >
-            0) {
-            this.spanList = [];
-            this.data.spanConfig.rows.forEach((item, index) => {
-              this.spanList.push({
-                arr: [],
-                position: 0
-              })
-              this.rowspan(this.spanList[index].arr, this.spanList[index].position, item.name);
-            })
-          }
-          // 鐗规畩鐨勫悎骞惰
-          if (this.data.spanConfig != undefined && this.data.spanConfig.special && this.data.spanConfig.special
-            .main && this.data.spanConfig.special.rows && this.data.spanConfig.special.rows.length > 0) {
-            this.specialSpanList = []
-            this.data.spanConfig.special.rows.forEach((item, index) => {
-              this.specialSpanList.push({
-                arr: [],
-                position: 0
-              })
-              this.rowspan(this.specialSpanList[index].arr, this.specialSpanList[index].position, this.data
-                .spanConfig.special.main);
-            })
-          }
-          this.loading = false
-        }).catch(e => {
-          console.log('璇峰埛鏂伴〉闈㈠啀灏濊瘯---', e)
-          this.loading = false
-          this.$message.error('璇峰埛鏂伴〉闈㈠啀灏濊瘯')
-        })
-      },
-      sortChange(ob) {
-        this.data.entity.orderBy = {}
-        this.data.entity.orderBy.field = ob.prop
-        if (ob.order == 'ascending') {
-          this.data.entity.orderBy.order = 'asc'
-        } else if (ob.order == 'descending') {
-          this.data.entity.orderBy.order = 'desc'
-        } else {
-          if (this.componentData.entity.orderBy != undefined) {
-            this.data.entity.orderBy = this.HaveJson(this.dataCopy.entity.orderBy)
-          }
-        }
-        this.selectList()
-      },
-      // 灞曠ずtag
-      showType(val, ob) {
-        var str = ob[val]
-        return str == undefined ? null : ob[val].select
-      },
-      // 灞曠ず鎿嶄綔鏍�
-      showLink(val, ob) {
-        var str = ob[val]
-        return str == undefined ? null : ob[val].method
-      },
-      showAddReq(label) {
-        if (this.data.requiredAdd == undefined) {
-          return
-        }
-        for (var i = 0; i < this.data.requiredAdd.length; i++) {
-          if (label == this.data.requiredAdd[i]) {
-            return true
-          }
-        }
-        return false
-      },
-      showUpReq(label) {
-        if (this.data.requiredUp == undefined) {
-          return
-        }
-        for (var i = 0; i < this.data.requiredUp.length; i++) {
-          if (label == this.data.requiredUp[i]) {
-            return true
-          }
-        }
-        return false
-      },
-      showUpload(label) {
-        if (this.data.addUpload && this.data.addUpload.find(m => m == label)) {
-          return true;
-        } else {
-          return false;
-        }
-      },
-      showCascader(label) {
-        if (this.data.cascaderField && this.data.cascaderField[label]) {
-          return true;
-        } else {
-          return false;
-        }
-      },
-      handleTree(arr, value) {
-        let label = ''
-        for (let i = 0; i < arr.length; i++) {
-          if (arr[i].id == value) {
-            label = arr[i].name
-            return label
-          } else if (arr[i].children) {
-            label = this.handleTree(arr[i].children, value)
-          }
-        }
-        return label
-      },
-      main(row, val) {
-        if (val.method == undefined) return
-        else if (val.method == 'doDiy') {
-          if (val.id == 'update') { // 缂栬緫鎿嶄綔
-            this.upDia = true,
+      }
+      return label
+    },
+    main(row, val) {
+      if (val.method == undefined) return
+      else if (val.method == 'doDiy') {
+        if (val.id == 'update') { // 缂栬緫鎿嶄綔
+          this.upDia = true,
             this.upData = this.HaveJson(row)
-            this.upHead = this.HaveJson(this.tableHead)
-            this.upHead.forEach((item, index) => {
-              if (this.data.cascaderField && this.data.cascaderField[item.label]) {
-                if (this.upData[item.label]) {
-                  this.upData[item.label] = JSON.parse(this.upData[item.label])
-                } else {
-                  this.upData[item.label] = []
-                }
-              }
-            })
-            this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime')
-            delete this.upData.orderBy
-            delete this.upData.createTime
-            delete this.upData.updateTime
-            delete this.upData.createUser
-            delete this.upData.updateUser
-            val.field.forEach(a => {
-              if (this.upData[a] === undefined) {
-                this.upHead.push({
-                  value: a.split('=')[0],
-                  label: a.split('=')[1]
-                })
+          this.upHead = this.HaveJson(this.tableHead)
+          this.upHead.forEach((item, index) => {
+            if (this.data.cascaderField && this.data.cascaderField[item.label]) {
+              if (this.upData[item.label]) {
+                this.upData[item.label] = JSON.parse(this.upData[item.label])
               } else {
-                delete this.upData[a]
-                for (var i = 0; i < this.upHead.length; i++) {
-                  if (this.upHead[i].label == a) {
-                    this.upHead.splice(i, 1);
-                    i--
-                    break
-                  }
-                }
+                this.upData[item.label] = []
               }
-            })
-          } else if (val.id == 'delete') { // 鍒犻櫎鎿嶄綔
-            if (this.delUrl == null) {
-              this.$message.error('璇风粰鍒犻櫎璇锋眰鍦板潃')
-              return
             }
-            this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
-              confirmButtonText: "纭畾",
-              cancelButtonText: "鍙栨秷",
-              type: "warning"
-            }).then(() => {
-              this.$axios.post(this.delUrl, {
-                id: row.id
-              }).then(res => {
-                if (res.code === 201) {
-                  return
-                }
-                this.$message.success('鍒犻櫎鎴愬姛')
-                this.selectList('page')
-                this.$emit('delete')
-              }).catch(e => {
-                this.$message.error('鍒犻櫎澶辫触')
+          })
+          this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime')
+          delete this.upData.orderBy
+          delete this.upData.createTime
+          delete this.upData.updateTime
+          delete this.upData.createUser
+          delete this.upData.updateUser
+          val.field.forEach(a => {
+            if (this.upData[a] === undefined) {
+              this.upHead.push({
+                value: a.split('=')[0],
+                label: a.split('=')[1]
               })
-            }).catch(() => {})
-          }
-        } else if (val.id === 'parent') {
-          delete row.orderBy
-          this.$parent.$parent[val.method](row)
-        } else {
-          delete row.orderBy
-          this.$parent[val.method](row)
-        }
-      },
-      saveUpData() {
-        if (this.upUrl == null) {
-          this.$message.error('璇风粰淇敼璇锋眰鍦板潃')
-          return
-        }
-        for (var i = 0; i < this.data.requiredUp.length; i++) {
-          // 蹇呭~鏍¢獙
-          if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') {
-            var list = this.upHead.filter(a => {
-              if (a.label == this.data.requiredUp[i]) return a
-            })
-            if (list[0].value == undefined) continue
-            this.$message.error(list[0].value + '鏄繀濉」')
-            return
-          }
-        }
-        for (var a in this.data.selectField) {
-          if (this.data.selectField[a].choose == true) {
-            this.upData[a] = JSON.stringify(this.upData[a])
-          }
-        }
-        for (var i = 0; i < this.upHead.length; i++) {
-          if(this.upHead[i].label == 'password'){
-            if(this.upData[this.upHead[i].label]){
-              const reg2 =/^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/;
-              if (!reg2.test(this.upData[this.upHead[i].label])) {
-                this.$message.error('瀵嗙爜蹇呴』鍖呮嫭鏁板瓧銆佸ぇ灏忓啓瀛楁瘝浠ュ強鐗规畩瀛楃')
-                return
-              }
-            }
-          }
-          if (this.data.cascaderField && this.data.cascaderField[this.upHead[i].label]) {
-            if (this.upData[this.upHead[i].label]) {
-              this.upData[this.upHead[i].label] = JSON.stringify(this.upData[this.upHead[i].label])
             } else {
-              this.upData[this.upHead[i].label] = ''
-            }
-          }
-        }
-        this.upLoad = true
-        this.$axios.post(this.upUrl, this.upData, {
-          headers: {
-            'Content-Type': 'application/json'
-          }
-        }).then(res => {
-          if (res.code === 201) {
-            this.upLoad = false
-            return
-          }
-          this.$message.success('淇敼鎴愬姛')
-          this.upDia = false
-          this.selectList('page')
-          this.$refs.eltable.doLayout();
-          this.upLoad = false
-        }).catch(e => {
-          this.$message.error('淇敼澶辫触')
-          this.upDia = false
-          this.upLoad = false
-        })
-      },
-      // 鎵撳紑鏂板寮规鍥炶皟
-      openAddDia(addUrl, param) {
-        this.addDia = true
-        this.addUrl = addUrl
-        this.param = param
-        this.upData = {}
-        this.tableHead.forEach((k, v) => {
-          if (k.label != 'orderBy' && k.label != 'createTime' && k.label != 'updateTime' && k.label != 'createUser' && k.label != 'updateUser')
-            this.upData[k.label] = null
-        })
-        this.upData = this.HaveJson(this.upData)
-        this.upHead = this.HaveJson(this.tableHead)
-        this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime')
-        var val = this.data.do.filter(a => a.id == 'update')[0]
-        if (val == undefined) {
-          val = {
-            field: []
-          }
-        }
-        val.field.forEach(a => {
-          if (JSON.stringify(this.upData[a]) === undefined) {
-            this.upHead.push({
-              value: a.split('=')[0],
-              label: a.split('=')[1]
-            })
-          } else {
-            delete this.upData[a]
-            for (var i = 0; i < this.upHead.length; i++) {
-              if (this.upHead[i].label == a) {
-                this.upHead.splice(i, 1);
-                i--
-                break
+              delete this.upData[a]
+              for (var i = 0; i < this.upHead.length; i++) {
+                if (this.upHead[i].label == a) {
+                  this.upHead.splice(i, 1);
+                  i--
+                  break
+                }
               }
             }
-          }
-        })
-      },
-      // 鏂板鍥炶皟
-      saveAddData() {
-        if (this.addUrl == null) {
-          this.$message.error('璇风粰娣诲姞璇锋眰鍦板潃')
-          return
-        }
-        for (var i = 0; i < this.data.requiredAdd.length; i++) {
-          if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '') {
-            var list = this.upHead.filter(a => {
-              if (a.label == this.data.requiredAdd[i]) return a
-            })
-            if (list[0].value == undefined) continue
-            this.$message.error(list[0].value + '鏄繀濉」')
+          })
+        } else if (val.id == 'delete') { // 鍒犻櫎鎿嶄綔
+          if (this.delUrl == null) {
+            this.$message.error('璇风粰鍒犻櫎璇锋眰鍦板潃')
             return
           }
-        }
-        this.addLoad = true
-        for (var a in this.data.selectField) {
-          if (this.data.selectField[a].choose == true) {
-            this.upData[a] = JSON.stringify(this.upData[a])
-          }
-        }
-        this.upHead.forEach((item, index) => {
-          if (this.data.cascaderField && this.data.cascaderField[item.label]) {
-            if (this.upData[item.label]) {
-              this.upData[item.label] = JSON.stringify(this.upData[item.label])
-            } else {
-              this.upData[item.label] = ''
-            }
-          }
-        })
-        if (this.param !== undefined && this.param !== null) {
-          for (let i in this.param) {
-            this.upData[i] = this.param[i]
-          }
-        }
-        this.$axios.post(this.addUrl, this.upData, {
-          headers: {
-            'Content-Type': 'application/json'
-          }
-        }).then(res => {
-          if (res.code === 201) {
-            this.addLoad = false
-            return
-          }
-          this.$message.success('娣诲姞鎴愬姛')
-          this.addDia = false
-          this.selectList('page')
-          this.addLoad = false
-        }).catch(e => {
-          this.addDia = false
-          this.addLoad = false
-        })
-      },
-      openDownDia() {
-        this.downDia = true
-      },
-      downFile(type) {
-        if (this.downUrl == null) {
-          this.$message.error('璇风粰瀵煎嚭璇锋眰鍦板潃')
-          return
-        }
-        var page = this.HaveJson(this.page)
-        if (!type) {
-          page.current = 0
-          page.size = this.total
-        }
-        this.loading = true
-        this.$axios.post(this.downUrl, {
-          page: page,
-          entity: this.data.entity
-        }, {
-          headers: {
-            'Content-Type': 'application/json'
-          }
-        }).then(res => {
-          if (res.code === 201) {
-            this.loading = false
-            return
-          }
-          this.downDia = false
-          this.loading = false
-          this.$message.success('瀵煎嚭鎴愬姛')
-          let eleLink = document.createElement('a')
-          eleLink.style.display = 'none'
-          eleLink.download = res.data
-          eleLink.href = this.javaApi + '/outPath/' + res.data
-          document.body.appendChild(eleLink)
-          eleLink.click()
-          document.body.removeChild(eleLink)
-        }).catch(e => {
-          console.log(e);
-          this.loading = false
-          this.$message.error('璇峰埛鏂伴〉闈㈠啀灏濊瘯')
-        })
-      },
-      openUpload() {
-        if (this.inputUrl == null) {
-          this.$message.error('璇风粰瀵煎叆璇锋眰鍦板潃')
-          return
-        }
-        this.uploadDia = true
-      },
-      beforeUpload(file, fileList) {
-        console.log(file.raw.type);
-        if (file.raw.type != (this.data.inputType===undefined?'text/csv':this.data.inputType)) {
-          this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�');
-          this.$refs.upload.clearFiles()
-          return false;
-        }
-      },
-      submitUpload() {
-        if (this.$refs.upload.uploadFiles.length == 0) {
-          this.$message.error('鏈�夋嫨鏂囦欢')
-          return
-        }
-        this.uploading = true
-        this.$refs.upload.submit();
-      },
-      onSuccess(response, file, fileList) {
-        this.$refs.upload.clearFiles()
-        this.uploadDia = false
-        this.uploading = false
-        if (response.code == 201) {
-          this.$message.error(response.message)
-          return
-        }
-        this.$message.success('涓婁紶鎴愬姛')
-        this.selectList()
-      },
-      onError(err, file, fileList) {
-        this.$message.error('涓婁紶澶辫触')
-        this.$refs.upload.clearFiles()
-        this.uploading = false
-      },
-      // 鎿嶄綔鎸夐挳缃伆鍒ゆ柇
-      isDisabled(label) {
-        if (this.data.disabledUp == undefined) {
-          return
-        }
-        for (var i = 0; i < this.data.disabledUp.length; i++) {
-          if (label == this.data.disabledUp[i]) {
-            return true
-          }
-        }
-        return false
-      },
-      getSummaries(param) {
-        const {
-          columns,
-          data
-        } = param;
-        const sums = [];
-        columns.forEach((column, index) => {
-          if (index === 0) {
-            sums[index] = '鍚堣';
-            return;
-          }
-          const values = data.map(item => Number(item[column.property]));
-          if (this.data.countFleid == undefined) {
-            sums[index] = ''
-            return
-          }
-          if (this.data.countFleid.filter(str => {
-              return str === column.property
-            }).length > 0) {
-            sums[index] = values.reduce((prev, curr) => {
-              const value = Number(curr);
-              if (!isNaN(value)) {
-                return prev + curr;
-              } else {
-                return prev;
-              }
-            }, 0);
-            sums[index] += '';
-          } else {
-            sums[index] = '';
-          }
-        });
-        return sums;
-      },
-      handleLinkEvent(row, val) {
-        if (val.method == 'doDiy') {
-          this.main(row, val)
-        } else {
-          this.$parent[val.method](row)
-        }
-      },
-      getWidth() {
-        let count = 0
-        this.data.do.forEach(a => {
-          count += a.font.length
-        })
-        return count * 15 + 60 + 'px'
-      },
-      handleSuccessUp(response, label) {
-        if (typeof label === 'string') {
-          if (response.code == 200) {
-            this.upData[label] = response.data.url;
-          }
-        } else {
-          if (response.code == 200) {
-            this.$message.success('涓婁紶鎴愬姛')
-            this.selectList()
-          }
-        }
-      },
-      handleCascader(e, label) {
-        this.upData[label] = e;
-      },
-      // 鎵归噺鍒犻櫎
-      batchDelete() {
-        if (this.multipleSelection && this.multipleSelection.length > 0) {
-          this.$confirm('鏄惁鍒犻櫎閫変腑鐨勬暟鎹�?', "璀﹀憡", {
+          this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
             confirmButtonText: "纭畾",
             cancelButtonText: "鍙栨秷",
             type: "warning"
           }).then(() => {
             this.$axios.post(this.delUrl, {
-              ids: JSON.stringify(this.multipleSelection.map(item => item.id))
+              id: row.id
             }).then(res => {
               if (res.code === 201) {
                 return
               }
               this.$message.success('鍒犻櫎鎴愬姛')
               this.selectList('page')
+              this.$emit('delete')
             }).catch(e => {
               this.$message.error('鍒犻櫎澶辫触')
             })
-          }).catch(() => {})
-        } else {
-          this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁')
+          }).catch(() => { })
         }
-      },
-      // 鏃ュ伐鏃剁鐞嗚緟鍔╁伐鏃�--鎵归噺瀹℃牳鍜屾壒鍑�
-      batchCheck(e) {
-        if (this.multipleSelection && this.multipleSelection.length > 0) {
-          const list = JSON.parse(JSON.stringify(this.multipleSelection))
-          const state = e === 0 ? '涓嶆壒鍑�' : '宸叉壒鍑�'
-          let auxiliaryWorkingHoursDays = []
-          list.forEach(item => {
-            delete item.orderBy
-            item.state = state
-            auxiliaryWorkingHoursDays.push(item)
+      } else if (val.id === 'parent') {
+        delete row.orderBy
+        this.$parent.$parent[val.method](row)
+      } else {
+        delete row.orderBy
+        this.$parent[val.method](row)
+      }
+    },
+    saveUpData() {
+      if (this.upUrl == null) {
+        this.$message.error('璇风粰淇敼璇锋眰鍦板潃')
+        return
+      }
+      for (var i = 0; i < this.data.requiredUp.length; i++) {
+        // 蹇呭~鏍¢獙
+        if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') {
+          var list = this.upHead.filter(a => {
+            if (a.label == this.data.requiredUp[i]) return a
           })
-          this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, {auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays
-            },{
-              headers: {
-                'Content-Type': 'application/json'
-              }
+          if (list[0].value == undefined) continue
+          this.$message.error(list[0].value + '鏄繀濉」')
+          return
+        }
+      }
+      for (var a in this.data.selectField) {
+        if (this.data.selectField[a].choose == true) {
+          this.upData[a] = JSON.stringify(this.upData[a])
+        }
+      }
+      for (var i = 0; i < this.upHead.length; i++) {
+        if (this.upHead[i].label == 'password') {
+          if (this.upData[this.upHead[i].label]) {
+            const reg2 = /^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/;
+            if (!reg2.test(this.upData[this.upHead[i].label])) {
+              this.$message.error('瀵嗙爜蹇呴』鍖呮嫭鏁板瓧銆佸ぇ灏忓啓瀛楁瘝浠ュ強鐗规畩瀛楃')
+              return
             }
-          ).then(res => {
+          }
+        }
+        if (this.data.cascaderField && this.data.cascaderField[this.upHead[i].label]) {
+          if (this.upData[this.upHead[i].label]) {
+            this.upData[this.upHead[i].label] = JSON.stringify(this.upData[this.upHead[i].label])
+          } else {
+            this.upData[this.upHead[i].label] = ''
+          }
+        }
+      }
+      this.upLoad = true
+      this.$axios.post(this.upUrl, this.upData, {
+        headers: {
+          'Content-Type': 'application/json'
+        }
+      }).then(res => {
+        if (res.code === 201) {
+          this.upLoad = false
+          return
+        }
+        this.$message.success('淇敼鎴愬姛')
+        this.upDia = false
+        this.selectList('page')
+        this.$refs.eltable.doLayout();
+        this.upLoad = false
+      }).catch(e => {
+        this.$message.error('淇敼澶辫触')
+        this.upDia = false
+        this.upLoad = false
+      })
+    },
+    // 鎵撳紑鏂板寮规鍥炶皟
+    openAddDia(addUrl, param) {
+      this.addDia = true
+      this.addUrl = addUrl
+      this.param = param
+      this.upData = {}
+      this.tableHead.forEach((k, v) => {
+        if (k.label != 'orderBy' && k.label != 'createTime' && k.label != 'updateTime' && k.label != 'createUser' && k.label != 'updateUser')
+          this.upData[k.label] = null
+      })
+      this.upData = this.HaveJson(this.upData)
+      this.upHead = this.HaveJson(this.tableHead)
+      this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime')
+      var val = this.data.do.filter(a => a.id == 'update')[0]
+      if (val == undefined) {
+        val = {
+          field: []
+        }
+      }
+      val.field.forEach(a => {
+        if (JSON.stringify(this.upData[a]) === undefined) {
+          this.upHead.push({
+            value: a.split('=')[0],
+            label: a.split('=')[1]
+          })
+        } else {
+          delete this.upData[a]
+          for (var i = 0; i < this.upHead.length; i++) {
+            if (this.upHead[i].label == a) {
+              this.upHead.splice(i, 1);
+              i--
+              break
+            }
+          }
+        }
+      })
+    },
+    // 鏂板鍥炶皟
+    saveAddData() {
+      if (this.addUrl == null) {
+        this.$message.error('璇风粰娣诲姞璇锋眰鍦板潃')
+        return
+      }
+      for (var i = 0; i < this.data.requiredAdd.length; i++) {
+        if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '') {
+          var list = this.upHead.filter(a => {
+            if (a.label == this.data.requiredAdd[i]) return a
+          })
+          if (list[0].value == undefined) continue
+          this.$message.error(list[0].value + '鏄繀濉」')
+          return
+        }
+      }
+      this.addLoad = true
+      for (var a in this.data.selectField) {
+        if (this.data.selectField[a].choose == true) {
+          this.upData[a] = JSON.stringify(this.upData[a])
+        }
+      }
+      this.upHead.forEach((item, index) => {
+        if (this.data.cascaderField && this.data.cascaderField[item.label]) {
+          if (this.upData[item.label]) {
+            this.upData[item.label] = JSON.stringify(this.upData[item.label])
+          } else {
+            this.upData[item.label] = ''
+          }
+        }
+      })
+      if (this.param !== undefined && this.param !== null) {
+        for (let i in this.param) {
+          this.upData[i] = this.param[i]
+        }
+      }
+      this.$axios.post(this.addUrl, this.upData, {
+        headers: {
+          'Content-Type': 'application/json'
+        }
+      }).then(res => {
+        if (res.code === 201) {
+          this.addLoad = false
+          return
+        }
+        this.$message.success('娣诲姞鎴愬姛')
+        this.addDia = false
+        this.selectList('page')
+        this.addLoad = false
+      }).catch(e => {
+        this.addDia = false
+        this.addLoad = false
+      })
+    },
+    openDownDia() {
+      this.downDia = true
+    },
+    downFile(type) {
+      if (this.downUrl == null) {
+        this.$message.error('璇风粰瀵煎嚭璇锋眰鍦板潃')
+        return
+      }
+      var page = this.HaveJson(this.page)
+      if (!type) {
+        page.current = 0
+        page.size = this.total
+      }
+      this.loading = true
+      this.$axios.post(this.downUrl, {
+        page: page,
+        entity: this.data.entity
+      }, {
+        headers: {
+          'Content-Type': 'application/json'
+        }
+      }).then(res => {
+        if (res.code === 201) {
+          this.loading = false
+          return
+        }
+        this.downDia = false
+        this.loading = false
+        this.$message.success('瀵煎嚭鎴愬姛')
+        let eleLink = document.createElement('a')
+        eleLink.style.display = 'none'
+        eleLink.download = res.data
+        eleLink.href = this.javaApi + '/outPath/' + res.data
+        document.body.appendChild(eleLink)
+        eleLink.click()
+        document.body.removeChild(eleLink)
+      }).catch(e => {
+        console.log(e);
+        this.loading = false
+        this.$message.error('璇峰埛鏂伴〉闈㈠啀灏濊瘯')
+      })
+    },
+    openUpload() {
+      if (this.inputUrl == null) {
+        this.$message.error('璇风粰瀵煎叆璇锋眰鍦板潃')
+        return
+      }
+      this.uploadDia = true
+    },
+    beforeUpload(file, fileList) {
+      console.log(file.raw.type);
+      if (file.raw.type != (this.data.inputType === undefined ? 'text/csv' : this.data.inputType)) {
+        this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�');
+        this.$refs.upload.clearFiles()
+        return false;
+      }
+    },
+    submitUpload() {
+      if (this.$refs.upload.uploadFiles.length == 0) {
+        this.$message.error('鏈�夋嫨鏂囦欢')
+        return
+      }
+      this.uploading = true
+      this.$refs.upload.submit();
+    },
+    onSuccess(response, file, fileList) {
+      this.$refs.upload.clearFiles()
+      this.uploadDia = false
+      this.uploading = false
+      if (response.code == 201) {
+        this.$message.error(response.message)
+        return
+      }
+      this.$message.success('涓婁紶鎴愬姛')
+      this.selectList()
+    },
+    onError(err, file, fileList) {
+      this.$message.error('涓婁紶澶辫触')
+      this.$refs.upload.clearFiles()
+      this.uploading = false
+    },
+    // 鎿嶄綔鎸夐挳缃伆鍒ゆ柇
+    isDisabled(label) {
+      if (this.data.disabledUp == undefined) {
+        return
+      }
+      for (var i = 0; i < this.data.disabledUp.length; i++) {
+        if (label == this.data.disabledUp[i]) {
+          return true
+        }
+      }
+      return false
+    },
+    getSummaries(param) {
+      const {
+        columns,
+        data
+      } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '鍚堣';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (this.data.countFleid == undefined) {
+          sums[index] = ''
+          return
+        }
+        if (this.data.countFleid.filter(str => {
+          return str === column.property
+        }).length > 0) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] += '';
+        } else {
+          sums[index] = '';
+        }
+      });
+      return sums;
+    },
+    handleLinkEvent(row, val) {
+      if (val.method == 'doDiy') {
+        this.main(row, val)
+      } else {
+        this.$parent[val.method](row)
+      }
+    },
+    getWidth() {
+      let count = 0
+      this.data.do.forEach(a => {
+        count += a.font.length
+      })
+      return count * 15 + 60 + 'px'
+    },
+    handleSuccessUp(response, label) {
+      if (typeof label === 'string') {
+        if (response.code == 200) {
+          this.upData[label] = response.data.url;
+        }
+      } else {
+        if (response.code == 200) {
+          this.$message.success('涓婁紶鎴愬姛')
+          this.selectList()
+        }
+      }
+    },
+    handleCascader(e, label) {
+      this.upData[label] = e;
+    },
+    // 鎵归噺鍒犻櫎
+    batchDelete() {
+      if (this.multipleSelection && this.multipleSelection.length > 0) {
+        this.$confirm('鏄惁鍒犻櫎閫変腑鐨勬暟鎹�?', "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          this.$axios.post(this.delUrl, {
+            ids: JSON.stringify(this.multipleSelection.map(item => item.id))
+          }).then(res => {
             if (res.code === 201) {
               return
             }
-            this.$parent.submitBatchCheckDialog()
-            this.$message.success('鎿嶄綔鎴愬姛')
+            this.$message.success('鍒犻櫎鎴愬姛')
+            this.selectList('page')
+          }).catch(e => {
+            this.$message.error('鍒犻櫎澶辫触')
           })
-        } else {
-          this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�')
+        }).catch(() => { })
+      } else {
+        this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁')
+      }
+    },
+    // 鏃ュ伐鏃剁鐞嗚緟鍔╁伐鏃�--鎵归噺瀹℃牳鍜屾壒鍑�
+    batchCheck(e) {
+      if (this.multipleSelection && this.multipleSelection.length > 0) {
+        const list = JSON.parse(JSON.stringify(this.multipleSelection))
+        const state = e === 0 ? '涓嶆壒鍑�' : '宸叉壒鍑�'
+        let auxiliaryWorkingHoursDays = []
+        list.forEach(item => {
+          delete item.orderBy
+          item.state = state
+          auxiliaryWorkingHoursDays.push(item)
+        })
+        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, {
+          auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays
+        }, {
+          headers: {
+            'Content-Type': 'application/json'
+          }
         }
-      },
-      getRedColor(label,row){
-        if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){
-          return true
-        }else{
-          return false
-        }
+        ).then(res => {
+          if (res.code === 201) {
+            return
+          }
+          this.$parent.submitBatchCheckDialog()
+          this.$message.success('鎿嶄綔鎴愬姛')
+        })
+      } else {
+        this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�')
+      }
+    },
+    getRedColor(label, row) {
+      if (this.data.cellSpecialStyle && this.data.cellSpecialStyle.redColorByKey && label.includes(this.data.cellSpecialStyle.redColorByKey) && row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]) {
+        return true
+      } else {
+        return false
       }
     }
   }
+}
 </script>

--
Gitblit v1.9.3