Преглед на файлове

Merge branch 'pre' of http://git.dgtis.com/sunlupeng/pointsMall-admin

sunlupeng преди 1 година
родител
ревизия
b5f5aa16a7

+ 1 - 1
config/index.js

@@ -14,7 +14,7 @@ module.exports = {
 
     // Various Dev Server settings
     // host: 'localhost', // can be overwritten by process.env.HOST
-    host: '192.168.100.73', // can be overwritten by process.env.HOST
+    host: '192.168.100.205', // can be overwritten by process.env.HOST
     port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: true,
     errorOverlay: true,

+ 22 - 0
src/api/trainManage.js

@@ -0,0 +1,22 @@
+import request from '@/utils/request'
+
+
+// 培训列表
+export function trainList(query) {
+  return request({
+    url: '/mall-train/admin/page',
+    method: 'get',
+    params:query
+  })
+}
+
+
+
+// 客户表彰审批
+export function complete(data) {
+  return request({
+    url: '/mall-train/admin/complete',
+    method: 'post',
+    data
+  })
+}

+ 7 - 0
src/permission.js

@@ -74,6 +74,11 @@ const myRoles = [
   'operateCiteList',
   'ceoCiteList',
 
+  'trainManage', 
+  'trainList',
+  'operateTrainList',
+  'ceoTrainList',
+
   'festivalManage', 
   'festivalList', 
 
@@ -89,6 +94,8 @@ const myRoles = [
 router.beforeEach((to, from, next) => {
   debugger
   NProgress.start() // start progress bar
+  // store.dispatch('SetToken', 'y8evar5b5yecmr6hjrhyokxw5tiqizw9');
+  // setToken('y8evar5b5yecmr6hjrhyokxw5tiqizw9');
   const path = to.path;
   const token = to.query.xToken;
   if (path.indexOf('auth') != -1 && token) { 

+ 15 - 0
src/router/index.js

@@ -241,6 +241,21 @@ export const asyncRouterMap = [
       { path: 'ceoCiteList', component: _import('commendManage/ceoCiteList'), name: 'ceoCiteList', meta: { title: '客户表彰确认列表', noCache: true }},
     ]
   },
+  {
+    path: '/trainManage',
+    component: Layout,
+    redirect: 'noredirect',
+    name: 'trainManage',
+    meta: {
+      title: '培训管理',
+      icon: 'xunzhang'
+    },
+    children: [
+      { path: 'trainList', component: _import('trainManage/trainList'), name: 'trainList', meta: { title: '培训列表', noCache: true }},
+      { path: 'operateTrainList', component: _import('trainManage/operateTrainList'), name: 'operateTrainList', meta: { title: '培训审批列表', noCache: true }},
+      { path: 'ceoTrainList', component: _import('trainManage/ceoTrainList'), name: 'ceoTrainList', meta: { title: '培训确认列表', noCache: true }},
+    ]
+  },
   {
     path: '/festivalManage',
     component: Layout,

+ 1 - 1
src/views/activityManage/activityList.vue

@@ -135,7 +135,7 @@
                     style="width: 350px">
                     </el-date-picker>
                 </el-form-item>
-                <el-form-item  v-if="dataForm.type=='1'" label="活动连接" prop="activityUrl">
+                <el-form-item  v-if="dataForm.type=='1'  || dataForm.type=='4'" label="活动连接" prop="activityUrl">
                     <el-input v-model="dataForm.activityUrl" style="width: 350px"></el-input>
                 </el-form-item>
                 <el-form-item label="参与人">

+ 143 - 110
src/views/commendManage/ceoCiteList.vue

@@ -6,10 +6,6 @@
         <el-option :key="item.dictValue" v-for="item in typeList" :label="item.dictLabel" :value="item.dictValue">
         </el-option>
       </el-select>
-      <!-- <el-select v-model="listQuery.category" clearable placeholder="表彰类别" class="filter-item" style="width: 200px">
-        <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
-        </el-option>
-      </el-select> -->
       <el-input clearable class="filter-item" style="width: 200px;" placeholder="客户名称"
         v-model="listQuery.customerName"></el-input>
       <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
@@ -83,49 +79,24 @@
       </el-table-column>
       <el-table-column align="center" min-width="120px" label="审核状态">
         <template slot-scope="props">
-                <el-popover trigger="hover">
-                  <el-table :data="props.row.logs" border size="mini">
-                    <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
-                    <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
-                    <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
-                  </el-table>
-                  <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
-                </el-popover>
-              </template>
+          <el-popover trigger="hover">
+            <el-table :data="props.row.logs" border size="mini">
+              <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
+              <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+              <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+          </el-popover>
+        </template>
       </el-table-column>
       <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
       </el-table-column>
-      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+      <el-table-column align="center" label="操作" width="160px" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button type="success" size="small"
-            @click="handleClick(scope.row)">处理</el-button>
-          </template>
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</el-button>
+        </template>
       </el-table-column>
     </el-table>
-    <el-dialog :close-on-click-modal="false" title="表彰审批" :visible.sync="dialogFormVisible" width="40%">
-            <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
-                <el-form-item label="表彰类型">
-                  <el-input disabled class="filter-item" v-model="dataForm.typeName"></el-input>
-                </el-form-item>
-                <!-- <el-form-item label="表彰类别" prop="category">
-                  <el-select v-model="dataForm.category" clearable placeholder="表彰类别" class="filter-item" style="width: 100%" @change="handleClickChangeType">
-                    <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
-                    </el-option>
-                  </el-select>
-                </el-form-item> -->
-                <el-form-item label="奖励积分" prop="integral">
-                  <el-input-number style="width: 100%;" :min="0" :step="1" v-model="dataForm.integral"></el-input-number>
-                  <!-- <el-input-number style="width: 100%;" :disabled="dataForm.category=='30' && dataForm.type!='1'?false:true" :min="0" :step="1" v-model="dataForm.integral"></el-input-number> -->
-                </el-form-item>
-                <el-form-item label="审批内容" prop="content">
-                  <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="complete(true)">同意</el-button>
-                <el-button type="danger" @click="complete(false)">驳回</el-button>
-            </div>
-        </el-dialog>
     <!-- 分页 -->
     <div class="pagination-container">
       <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
@@ -133,6 +104,82 @@
         layout="total, sizes, prev, pager, next, jumper" :total="total">
       </el-pagination>
     </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="表彰类型">
+            <el-input disabled v-model="detailData.typeName"></el-input>
+          </el-form-item>
+          <el-form-item label="表彰名称">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="客户名称">
+            <el-input disabled v-model="detailData.customerName"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.userName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.deptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="积分">
+            <el-input disabled v-model="detailData.integral"></el-input>
+          </el-form-item>
+          <el-form-item label="附件">
+            <div v-for="(item, index) in detailData.files" :key="index">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+
+        </div>
+        <h3></h3>
+        <el-form-item label="表彰描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>表彰人员</h4>
+      <el-table :data="detailData.groupUsers" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.logs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+      <el-form style="margin-top: 20px;" :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left"
+        label-width="80px">
+        <!-- <el-form-item label="表彰类型">
+          <el-input disabled class="filter-item" v-model="dataForm.typeName"></el-input>
+        </el-form-item> -->
+        <el-form-item label="奖励积分" prop="integral">
+          <el-input-number style="width: 100%;" :min="10" :step="1" v-model="dataForm.integral"></el-input-number>
+        </el-form-item>
+        <el-form-item label="审批内容" prop="content">
+          <el-input type="textarea" :rows="4" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="complete(true)">同意</el-button>
+        <el-button type="danger" @click="complete(false)">驳回</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
     
@@ -144,6 +191,7 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 1;
 }
+
 .demo-table-expand {
   font-size: 0;
 }
@@ -173,18 +221,15 @@ export default {
   directives: { waves },
   data() {
     return {
-      id:'',
-      integral:'',
+      id: '',
+      integral: '',
       dataForm: {
-        category: '',
-        integral:'',
+        integral: '',
         content: ''
       },
       rules: {
-        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
         integral: [{ required: true, message: "请填写积分", trigger: "blur" }],
       },
-      dialogFormVisible: false,
       dialogVisible: false,
       categoryList: [],
       typeList: [],
@@ -196,12 +241,18 @@ export default {
         page: 1,
         limit: 10,
         type: '',
-        category: '',
         customerName: '',
         title: '',
         userName: '',
         status: "20",
       },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
     };
   },
   created() {
@@ -211,71 +262,53 @@ export default {
     this.getList();
   },
   methods: {
-    handleClickChangeType(val){
-      if(val=='30'&&this.dataForm.type=='1'){
-        this.dataForm.integral = this.integral;
-      }else{
-        this.dataForm.integral = this.categoryList.find(item => item.dictValue == val).remark;
+    handleClickView(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+      this.id = row.id;
+      this.dataForm.typeName = row.typeName;
+      this.dataForm.integral = row.integral;
+      this.$nextTick(() => {
+        this.dataForm.content = '';
+        this.$refs["dataForm"].clearValidate();
+      });
+    },
+    checked(val) {
+      if (val.flag == false) {
+        if (!val.content) {
+          this.$alert("请输入审批内容", "提示", {
+            confirmButtonText: "确定",
+          });
+          return false;
+        }
       }
-      
+      return true;
     },
-    checked(val){
-            if(val.flag == false){
-                if(!val.content){
-                    this.$alert("请输入审批内容", "提示", {
-                        confirmButtonText: "确定",
-                    });
-                    return false;
-                }
-            }
-            // if(val.flag == true){
-            //     if(!val.category){
-            //         this.$alert("请选择表彰类别", "提示", {
-            //             confirmButtonText: "确定",
-            //         });
-            //         return false;
-            //     }
-            // }
-            return true;
-        },
     complete(flag) {
-            const parms = {
-                id:this.id,
-                addIntergral:this.dataForm.integral,
-                category:this.dataForm.category,
-                content: this.dataForm.content,
-                flag:flag,
-            }
-            const isChecked = this.checked(parms);
-            if(isChecked){
-                complete(parms).then((response) => {
-                    this.$notify({
-                        title: "成功",
-                        message: "操作成功",
-                        type: "success",
-                        duration: 2000,
-                    });
-                    this.dialogFormVisible = false;
-                    this.getList();
-                })
-                .catch(() => { });
-            }
-            
-        },
-      handleClick(val) {
-        this.dialogFormVisible = true;
-        this.id = val.id;
-        this.integral = val.integral;
-        
-        this.dataForm.typeName = val.typeName;
-        this.dataForm.category = val.category;
-        this.dataForm.integral = val.integral;
-        this.dataForm.type = val.type;
-        this.$nextTick(() => {
-            this.dataForm.content = '';
-            this.$refs["dataForm"].clearValidate();
-        });
-      },
+      const parms = {
+        id: this.id,
+        addIntergral: this.dataForm.integral,
+        content: this.dataForm.content,
+        flag: flag,
+      }
+      const isChecked = this.checked(parms);
+      if (isChecked) {
+        complete(parms).then((response) => {
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success",
+            duration: 2000,
+          });
+          this.dialogVisible = false;
+          this.getList();
+        })
+          .catch(() => { });
+      }
+
+    },
     getCategoryList() {
       dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
         this.categoryList = response.data.data;

+ 79 - 2
src/views/commendManage/citeList.vue

@@ -49,7 +49,7 @@
               <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
             </el-table>
             <span style="color: #1e80ff;cursor: pointer;" slot="reference">
-              {{ props.row.userName }}
+              {{ props.row.groupUsers[0].userName }}
             </span>
           </el-popover>
         </template>
@@ -95,6 +95,11 @@
       </el-table-column>
       <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
       </el-table-column>
+      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="primary" size="small" @click="handleClick(scope.row, 'view')">查看</el-button>
+        </template>
+      </el-table-column>
     </el-table>
 
     <!-- 分页 -->
@@ -104,6 +109,66 @@
         layout="total, sizes, prev, pager, next, jumper" :total="total">
       </el-pagination>
     </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="表彰类型">
+            <el-input disabled v-model="detailData.typeName"></el-input>
+          </el-form-item>
+          <el-form-item label="表彰名称">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="客户名称">
+            <el-input disabled v-model="detailData.customerName"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.userName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.deptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="积分">
+            <el-input disabled v-model="detailData.integral"></el-input>
+          </el-form-item>
+          <el-form-item label="附件">
+            <div v-for="(item, index) in detailData.files" :key="index">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+
+        </div>
+        <h3></h3>
+        <el-form-item label="表彰描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>表彰人员</h4>
+      <el-table :data="detailData.groupUsers" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.logs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
     
@@ -144,7 +209,6 @@ export default {
   directives: { waves },
   data() {
     return {
-      detailData: {},
       tableData: [],
       dialogVisible: false,
       categoryList: [],
@@ -163,6 +227,13 @@ export default {
         userName: '',
         status: "",
       },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
     };
   },
   created() {
@@ -172,6 +243,12 @@ export default {
     this.getList();
   },
   methods: {
+    handleClick(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+    },
     getCategoryList() {
       dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
         this.categoryList = response.data.data;

+ 134 - 97
src/views/commendManage/operateCiteList.vue

@@ -6,22 +6,13 @@
         <el-option :key="item.dictValue" v-for="item in typeList" :label="item.dictLabel" :value="item.dictValue">
         </el-option>
       </el-select>
-      <!-- <el-select v-model="listQuery.category" clearable placeholder="表彰类别" class="filter-item" style="width: 200px">
-        <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
-        </el-option>
-      </el-select> -->
       <el-input clearable class="filter-item" style="width: 200px;" placeholder="客户名称"
         v-model="listQuery.customerName"></el-input>
       <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
         v-model="listQuery.title"></el-input>
       <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
         v-model="listQuery.userName"></el-input>
-      <!-- <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
-        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
-        </el-option>
-      </el-select> -->
       <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
-      <!-- <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button> -->
     </div>
 
     <!-- 查询结果 -->
@@ -83,43 +74,24 @@
       </el-table-column>
       <el-table-column align="center" min-width="120px" label="审核状态">
         <template slot-scope="props">
-                <el-popover trigger="hover">
-                  <el-table :data="props.row.logs" border size="mini">
-                    <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
-                    <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
-                    <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
-                  </el-table>
-                  <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
-                </el-popover>
-              </template>
+          <el-popover trigger="hover">
+            <el-table :data="props.row.logs" border size="mini">
+              <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
+              <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+              <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+          </el-popover>
+        </template>
       </el-table-column>
       <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
       </el-table-column>
-      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+      <el-table-column align="center" label="操作" width="160px" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button type="success" size="small"
-            @click="handleClick(scope.row.id)">处理</el-button>
-          </template>
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</el-button>
+        </template>
       </el-table-column>
     </el-table>
-    <el-dialog :close-on-click-modal="false" title="表彰审批" :visible.sync="dialogFormVisible" width="40%">
-            <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
-              
-                <!-- <el-form-item label="表彰类别" prop="category">
-                  <el-select v-model="dataForm.category" clearable placeholder="表彰类别" class="filter-item" style="width: 100%">
-                    <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
-                    </el-option>
-                  </el-select>
-                </el-form-item> -->
-                <el-form-item label="审批内容" prop="content">
-                  <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="complete(true)">同意</el-button>
-                <el-button type="danger" @click="complete(false)">驳回</el-button>
-            </div>
-        </el-dialog>
     <!-- 分页 -->
     <div class="pagination-container">
       <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
@@ -127,6 +99,76 @@
         layout="total, sizes, prev, pager, next, jumper" :total="total">
       </el-pagination>
     </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="表彰类型">
+            <el-input disabled v-model="detailData.typeName"></el-input>
+          </el-form-item>
+          <el-form-item label="表彰名称">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="客户名称">
+            <el-input disabled v-model="detailData.customerName"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.userName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.deptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="积分">
+            <el-input disabled v-model="detailData.integral"></el-input>
+          </el-form-item>
+          <el-form-item label="附件">
+            <div v-for="(item, index) in detailData.files" :key="index">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+
+        </div>
+        <h3></h3>
+        <el-form-item label="表彰描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>表彰人员</h4>
+      <el-table :data="detailData.groupUsers" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.logs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+      <el-form style="margin-top: 20px;" ref="dataForm" :model="dataForm" status-icon label-position="left"
+        label-width="80px">
+        <el-form-item label="审批内容" prop="content">
+          <el-input type="textarea" :rows="4" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="complete(true)">同意</el-button>
+        <el-button type="danger" @click="complete(false)">驳回</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
     
@@ -138,6 +180,7 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 1;
 }
+
 .demo-table-expand {
   font-size: 0;
 }
@@ -167,15 +210,10 @@ export default {
   directives: { waves },
   data() {
     return {
-      id:'',
+      id: '',
       dataForm: {
-        category: '',
         content: ''
       },
-      rules: {
-        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
-      },
-      dialogFormVisible: false,
       dialogVisible: false,
       categoryList: [],
       typeList: [],
@@ -187,12 +225,18 @@ export default {
         page: 1,
         limit: 10,
         type: '',
-        category: '',
         customerName: '',
         title: '',
         userName: '',
         status: "10",
       },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
     };
   },
   created() {
@@ -202,57 +246,50 @@ export default {
     this.getList();
   },
   methods: {
-    checked(val){
-            if(val.flag == false){
-                if(!val.content){
-                    this.$alert("请输入审批内容", "提示", {
-                        confirmButtonText: "确定",
-                    });
-                    return false;
-                }
-            }
-            // if(val.flag == true){
-            //     if(!val.category){
-            //         this.$alert("请选择表彰类别", "提示", {
-            //             confirmButtonText: "确定",
-            //         });
-            //         return false;
-            //     }
-            // }
-            return true;
-        },
+    handleClickView(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+      this.id = row.id;
+      this.$nextTick(() => {
+        this.dataForm.content = '';
+        this.$refs["dataForm"].clearValidate();
+      });
+    },
+    checked(val) {
+      if (val.flag == false) {
+        if (!val.content) {
+          this.$alert("请输入审批内容", "提示", {
+            confirmButtonText: "确定",
+          });
+          return false;
+        }
+      }
+      return true;
+    },
     complete(flag) {
-            const parms = {
-                id:this.id,
-                category:this.dataForm.category,
-                content: this.dataForm.content,
-                flag:flag,
-            }
-            const isChecked = this.checked(parms);
-            if(isChecked){
-                complete(parms).then((response) => {
-                    this.$notify({
-                        title: "成功",
-                        message: "操作成功",
-                        type: "success",
-                        duration: 2000,
-                    });
-                    this.dialogFormVisible = false;
-                    this.getList();
-                })
-                .catch(() => { });
-            }
-            
-        },
-      handleClick(id) {
-        this.dialogFormVisible = true;
-        this.id = id;
-        this.$nextTick(() => {
-            this.dataForm.category = '';
-            this.dataForm.content = '';
-            this.$refs["dataForm"].clearValidate();
-        });
-      },
+      const parms = {
+        id: this.id,
+        content: this.dataForm.content,
+        flag: flag,
+      }
+      const isChecked = this.checked(parms);
+      if (isChecked) {
+        complete(parms).then((response) => {
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success",
+            duration: 2000,
+          });
+          this.dialogVisible = false;
+          this.getList();
+        })
+          .catch(() => { });
+      }
+
+    },
     getCategoryList() {
       dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
         this.categoryList = response.data.data;

+ 385 - 0
src/views/trainManage/ceoTrainList.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="培训主题"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <el-select v-model="listQuery.status" disabled clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="培训主题">
+      </el-table-column>
+      <!-- <el-table-column align="center" prop="startTime" min-width="150" label="培训开始时间">
+      </el-table-column>
+      <el-table-column align="center" prop="endTime" min-width="150" label="培训结束时间">
+      </el-table-column> -->
+      <el-table-column align="center" prop="lecturerName" min-width="150" label="培训讲师">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="讲师积分" prop="lecturerIntegral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="参加人积分" prop="traineeIntegral">
+      </el-table-column>
+     
+      <el-table-column align="center" min-width="80px" label="上传人" prop="candidateName">
+      </el-table-column>
+      <el-table-column align="center" min-width="250px" label="部门" prop="candidateDeptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="150px" label="日期" prop="createTime">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="200px" label="培训材料">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.materialFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="签到表照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.signPhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="现场照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.sitePhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column min-width="100" align="center" label="培训描述">
+        <template slot-scope="props">
+          <el-popover width="400" trigger="hover" :content="props.row.content">
+            <div slot="reference" class="text-overflow">{{ props.row.content }}</div>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100" label="参加人员">
+        <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainees" border size="mini">
+              <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">
+              {{ props.row.trainees[0].userName }}
+            </span>
+          </el-popover>
+        </template>
+      </el-table-column> -->
+      <el-table-column align="center" min-width="120px" label="审核状态" prop="statusName">
+        <!-- <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainLogs" border size="mini">
+              <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
+              <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+              <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+          </el-popover>
+        </template> -->
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="160px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</el-button>
+          </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
+     <!-- 添加或修改对话框 -->
+     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="培训主题">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="培训开始时间">
+            <el-input disabled v-model="detailData.startTime"></el-input>
+          </el-form-item>
+          <el-form-item label="培训结束时间">
+            <el-input disabled v-model="detailData.endTime"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="培训讲师">
+            <el-input disabled v-model="detailData.lecturerName"></el-input>
+          </el-form-item>
+          <el-form-item label="讲师积分">
+            <el-input disabled v-model="detailData.lecturerIntegral"></el-input>
+          </el-form-item>
+          <el-form-item label="参加人积分">
+            <el-input disabled v-model="detailData.traineeIntegral"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.candidateName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.candidateDeptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="培训材料">
+            <div v-for="(item, index) in detailData.materialFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="签到表照片">
+            <div v-for="(item, index) in detailData.signPhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="现场照片">
+            <div v-for="(item, index) in detailData.sitePhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+        </div>
+        <h3></h3>
+        <el-form-item label="培训描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>参加人员</h4>
+      <el-table :data="detailData.trainees" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.trainLogs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+      <el-form style="margin-top: 20px;" :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="100px">
+                <el-form-item label="讲师积分" prop="lecturerIntegral">
+                  <el-input-number style="width: 100%;" :min="10" :step="1" v-model="dataForm.lecturerIntegral"></el-input-number>
+                </el-form-item>
+                <el-form-item label="参加人积分" prop="traineeIntegral">
+                  <el-input-number style="width: 100%;" :min="10" :step="1" v-model="dataForm.traineeIntegral"></el-input-number>
+                </el-form-item>
+                <el-form-item label="审批意见" prop="content">
+                  <el-input type="textarea" :rows="2" placeholder="请输入审批意见" v-model="dataForm.content"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="complete(true)">同意</el-button>
+                <el-button type="danger" @click="complete(false)">驳回</el-button>
+            </div>
+    </el-dialog>
+  </div>
+</template>
+    
+<style>
+.text-overflow {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+}
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
+    
+<script>
+import {
+  complete,
+  trainList,
+} from "@/api/trainManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      dataForm: {
+        lecturerIntegral:'',
+        traineeIntegral:'',
+        content: ''
+      },
+      rules: {
+        lecturerIntegral: [{ required: true, message: "请填写积分", trigger: "blur" }],
+        traineeIntegral: [{ required: true, message: "请填写积分", trigger: "blur" }],
+      },
+      dialogVisible: false,
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        title: '',
+        userName: '',
+        status: "30",
+      },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
+    };
+  },
+  created() {
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    handleClickView(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+      this.id = row.id;
+        this.$nextTick(() => {
+            this.dataForm.content = '';
+            this.$refs["dataForm"].clearValidate();
+        });
+    },
+    
+    checked(val){
+            if(val.flag == false){
+                if(!val.comment){
+                    this.$alert("请输入审批内容", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+            return true;
+        },
+    complete(flag) {
+            const parms = {
+                trainInfoId:this.id,
+                lecturerIntegral:this.dataForm.lecturerIntegral,
+                traineeIntegral:this.dataForm.traineeIntegral,
+                comment: this.dataForm.content,
+                flag:flag,
+            }
+            const isChecked = this.checked(parms);
+            if(isChecked){
+                complete(parms).then((response) => {
+                    this.$notify({
+                        title: "成功",
+                        message: "操作成功",
+                        type: "success",
+                        duration: 2000,
+                    });
+                    this.dialogVisible = false;
+                    this.getList();
+                })
+                .catch(() => { });
+            }
+            
+        },
+    
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'train_complete_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    getList() {
+      this.listLoading = true;
+      trainList(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
+        });
+    },
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
+    

+ 374 - 0
src/views/trainManage/operateTrainList.vue

@@ -0,0 +1,374 @@
+<template>
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="培训主题"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <el-select v-model="listQuery.status" disabled clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="培训主题">
+      </el-table-column>
+      <!-- <el-table-column align="center" prop="startTime" min-width="150" label="培训开始时间">
+      </el-table-column>
+      <el-table-column align="center" prop="endTime" min-width="150" label="培训结束时间">
+      </el-table-column> -->
+      <el-table-column align="center" prop="lecturerName" min-width="150" label="培训讲师">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="讲师积分" prop="lecturerIntegral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="参加人积分" prop="traineeIntegral">
+      </el-table-column>
+     
+      <el-table-column align="center" min-width="80px" label="上传人" prop="candidateName">
+      </el-table-column>
+      <el-table-column align="center" min-width="250px" label="部门" prop="candidateDeptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="150px" label="日期" prop="createTime">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="200px" label="培训材料">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.materialFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="签到表照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.signPhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="现场照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.sitePhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column min-width="100" align="center" label="培训描述">
+        <template slot-scope="props">
+          <el-popover width="400" trigger="hover" :content="props.row.content">
+            <div slot="reference" class="text-overflow">{{ props.row.content }}</div>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100" label="参加人员">
+        <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainees" border size="mini">
+              <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">
+              {{ props.row.trainees[0].userName }}
+            </span>
+          </el-popover>
+        </template>
+      </el-table-column> -->
+      <el-table-column align="center" min-width="120px" label="审核状态" prop="statusName">
+        <!-- <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainLogs" border size="mini">
+              <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
+              <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+              <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+          </el-popover>
+        </template> -->
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="160px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</el-button>
+          </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
+     <!-- 添加或修改对话框 -->
+     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="培训主题">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="培训开始时间">
+            <el-input disabled v-model="detailData.startTime"></el-input>
+          </el-form-item>
+          <el-form-item label="培训结束时间">
+            <el-input disabled v-model="detailData.endTime"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="培训讲师">
+            <el-input disabled v-model="detailData.lecturerName"></el-input>
+          </el-form-item>
+          <el-form-item label="讲师积分">
+            <el-input disabled v-model="detailData.lecturerIntegral"></el-input>
+          </el-form-item>
+          <el-form-item label="参加人积分">
+            <el-input disabled v-model="detailData.traineeIntegral"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.candidateName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.candidateDeptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="培训材料">
+            <div v-for="(item, index) in detailData.materialFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="签到表照片">
+            <div v-for="(item, index) in detailData.signPhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="现场照片">
+            <div v-for="(item, index) in detailData.sitePhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+        </div>
+        <h3></h3>
+        <el-form-item label="培训描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>参加人员</h4>
+      <el-table :data="detailData.trainees" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.trainLogs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+      <el-form style="margin-top: 20px;" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
+                <el-form-item label="审批意见" prop="content">
+                  <el-input type="textarea" :rows="2" placeholder="请输入审批意见" v-model="dataForm.content"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="complete(true)">同意</el-button>
+                <el-button type="danger" @click="complete(false)">驳回</el-button>
+            </div>
+    </el-dialog>
+  </div>
+</template>
+    
+<style>
+.text-overflow {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+}
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
+    
+<script>
+import {
+  complete,
+  trainList,
+} from "@/api/trainManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      dataForm: {
+        content: ''
+      },
+      dialogVisible: false,
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        title: '',
+        userName: '',
+        status: "20",
+      },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
+    };
+  },
+  created() {
+
+
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    handleClickView(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+      this.id = row.id;
+        this.$nextTick(() => {
+            this.dataForm.content = '';
+            this.$refs["dataForm"].clearValidate();
+        });
+    },
+    checked(val){
+            if(val.flag == false){
+                if(!val.comment){
+                    this.$alert("请输入审批内容", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+           
+            return true;
+        },
+    complete(flag) {
+            const parms = {
+                trainInfoId:this.id,
+                comment: this.dataForm.content,
+                flag:flag,
+            }
+            const isChecked = this.checked(parms);
+            if(isChecked){
+                complete(parms).then((response) => {
+                    this.$notify({
+                        title: "成功",
+                        message: "操作成功",
+                        type: "success",
+                        duration: 2000,
+                    });
+                    this.dialogVisible = false;
+                    this.getList();
+                })
+                .catch(() => { });
+            }
+            
+        },
+  
+  
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'train_complete_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    getList() {
+      this.listLoading = true;
+      trainList(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
+        });
+    },
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
+    

+ 328 - 0
src/views/trainManage/trainList.vue

@@ -0,0 +1,328 @@
+<template>
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="培训主题"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="培训主题">
+      </el-table-column>
+      <!-- <el-table-column align="center" prop="startTime" min-width="150" label="培训开始时间">
+      </el-table-column>
+      <el-table-column align="center" prop="endTime" min-width="150" label="培训结束时间">
+      </el-table-column> -->
+      <el-table-column align="center" prop="lecturerName" min-width="150" label="培训讲师">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="讲师积分" prop="lecturerIntegral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="参加人积分" prop="traineeIntegral">
+      </el-table-column>
+     
+      <el-table-column align="center" min-width="80px" label="上传人" prop="candidateName">
+      </el-table-column>
+      <el-table-column align="center" min-width="250px" label="部门" prop="candidateDeptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="150px" label="日期" prop="createTime">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="200px" label="培训材料">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.materialFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="签到表照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.signPhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="现场照片">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.sitePhotoFiles" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column min-width="100" align="center" label="培训描述">
+        <template slot-scope="props">
+          <el-popover width="400" trigger="hover" :content="props.row.content">
+            <div slot="reference" class="text-overflow">{{ props.row.content }}</div>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100" label="参加人员">
+        <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainees" border size="mini">
+              <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+              <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">
+              {{ props.row.trainees[0].userName }}
+            </span>
+          </el-popover>
+        </template>
+      </el-table-column> -->
+      <el-table-column align="center" min-width="120px" label="审核状态" prop="statusName">
+        <!-- <template slot-scope="props">
+          <el-popover trigger="hover">
+            <el-table :data="props.row.trainLogs" border size="mini">
+              <el-table-column min-width="120" align="center" prop="auditor" label="处理人"></el-table-column>
+              <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+              <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+            </el-table>
+            <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+          </el-popover>
+        </template> -->
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="primary" size="small" @click="handleClick(scope.row, 'view')">查看</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+      <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
+        <div style="display: flex;">
+
+          <el-form-item label="培训主题">
+            <el-input disabled v-model="detailData.title"></el-input>
+          </el-form-item>
+          <el-form-item label="培训开始时间">
+            <el-input disabled v-model="detailData.startTime"></el-input>
+          </el-form-item>
+          <el-form-item label="培训结束时间">
+            <el-input disabled v-model="detailData.endTime"></el-input>
+          </el-form-item>
+        </div>
+
+        <div style="display: flex;">
+          <el-form-item label="培训讲师">
+            <el-input disabled v-model="detailData.lecturerName"></el-input>
+          </el-form-item>
+          <el-form-item label="讲师积分">
+            <el-input disabled v-model="detailData.lecturerIntegral"></el-input>
+          </el-form-item>
+          <el-form-item label="参加人积分">
+            <el-input disabled v-model="detailData.traineeIntegral"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="上传人">
+            <el-input disabled v-model="detailData.candidateName"></el-input>
+          </el-form-item>
+          <el-form-item label="部门">
+            <el-input disabled v-model="detailData.candidateDeptName"></el-input>
+          </el-form-item>
+          <el-form-item label="日期">
+            <el-input disabled v-model="detailData.createTime"></el-input>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="培训材料">
+            <div v-for="(item, index) in detailData.materialFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="签到表照片">
+            <div v-for="(item, index) in detailData.signPhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+          <el-form-item label="现场照片">
+            <div v-for="(item, index) in detailData.sitePhotoFiles" :key="index" style="width: 192px;">
+              <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+            </div>
+          </el-form-item>
+        </div>
+        <h3></h3>
+        <el-form-item label="培训描述">
+          <el-input disabled type="textarea" v-model="detailData.content" style="width: 100%"></el-input>
+        </el-form-item>
+      </el-form>
+      <h4>参加人员</h4>
+      <el-table :data="detailData.trainees" border style="width: 100%">
+        <el-table-column min-width="200" align="center" prop="deptName" label="部门"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="userName" label="姓名"></el-table-column>
+        <el-table-column min-width="100" align="center" prop="employeNo" label="员工号"></el-table-column>
+      </el-table>
+      <h4>审批状态</h4>
+      <el-table :data="detailData.trainLogs" border style="width: 100%">
+        <el-table-column align="center" prop="auditor" label="处理人" width="180">
+        </el-table-column>
+
+        <el-table-column align="center" prop="comment" label="处理结果">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="处理时间" width="180">
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+    
+<style>
+.text-overflow {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+}
+
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
+    
+<script>
+import {
+  trainList,
+} from "@/api/trainManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      tableData: [],
+      dialogVisible: false,
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        type: '',
+        category: '',
+        customerName: '',
+        title: '',
+        userName: '',
+        status: "",
+      },
+      dialogVisible: false,
+      dialogStatus: '',
+      textMap: {
+        complete: "审批",
+        view: "详情",
+      },
+      detailData: {},
+    };
+  },
+  created() {
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    handleClick(row, tag) {
+      console.log(row);
+      this.dialogStatus = tag;
+      this.detailData = row;
+      this.dialogVisible = true;
+    },
+  
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'train_complete_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    handleDownLoad() {
+      window.location.href = process.env.BASE_API + '/mall-integral-obtain/export/certificate?name=' + this.listQuery.name + '&title=' + this.listQuery.title + '&userName=' + this.listQuery.userName + '&status=' + this.listQuery.status;
+    },
+    getList() {
+      this.listLoading = true;
+      trainList(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
+        });
+    },
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
+