ltao 3 éve
szülő
commit
21b841ba27

+ 53 - 0
src/api/regulations/directoryinfo.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询规章制度目录列表
+export function listDirectoryinfo(query) {
+  return request({
+    url: '/regulations/directoryinfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询规章制度目录详细
+export function getDirectoryinfo(id) {
+  return request({
+    url: '/regulations/directoryinfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增规章制度目录
+export function addDirectoryinfo(data) {
+  return request({
+    url: '/regulations/directoryinfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改规章制度目录
+export function updateDirectoryinfo(data) {
+  return request({
+    url: '/regulations/directoryinfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除规章制度目录
+export function delDirectoryinfo(id) {
+  return request({
+    url: '/regulations/directoryinfo/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出规章制度目录
+export function exportDirectoryinfo(query) {
+  return request({
+    url: '/regulations/directoryinfo/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/regulations/fileinfo.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询规章制度文件记录列表
+export function listFileinfo(query) {
+  return request({
+    url: '/regulations/fileinfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询规章制度文件记录详细
+export function getFileinfo(id) {
+  return request({
+    url: '/regulations/fileinfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增规章制度文件记录
+export function addFileinfo(data) {
+  return request({
+    url: '/regulations/fileinfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改规章制度文件记录
+export function updateFileinfo(data) {
+  return request({
+    url: '/regulations/fileinfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除规章制度文件记录
+export function delFileinfo(id) {
+  return request({
+    url: '/regulations/fileinfo/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出规章制度文件记录
+export function exportFileinfo(query) {
+  return request({
+    url: '/regulations/fileinfo/export',
+    method: 'get',
+    params: query
+  })
+}

+ 23 - 0
src/api/workingArrangements/workTask.js

@@ -83,4 +83,27 @@ export function getDept(query) {
     method: 'get',
     params: query
   })
+}
+// 单人进度录入
+export function singProgress(id) {
+  return request({
+    url:`/workingArrangements/workTask/getJinDu?id=${id}`,
+    method:"get"
+  })
+}
+
+// 多人进度录入
+export function moreProgress(id) {
+  return request({
+    url:`/workingArrangements/workTask/getZJinDu?id=${id}`,
+    method:"get"
+  })
+}
+// 进度录入上传数据接口
+export function uploadProgress(obj) { 
+  return request({
+    url:"/workingArrangements/workProgress",
+    method:"put",
+    data:obj
+  })
 }

BIN
src/images/uploads.png


+ 6 - 1
src/views/pt.vue

@@ -33,7 +33,7 @@
               </div>
             </li>
             <li>
-              <div class="demo active" data-url="/diary?ref=addtabs">
+              <div class="demo active" v-on:click="guizhangfun"  data-url="/diary?ref=addtabs">
                 <img src="../images/zd.png" alt />
                 <br />
                 <a href="#" class="a">规 章 制 度</a>
@@ -300,6 +300,11 @@ export default {
         .push({ path: "/index", query: { name: "/workingArrangements" } })
         .catch(() => {});
     },
+    guizhangfun(){
+      this.$router
+        .push({ path: "/index", query: { name: "/regulations" } })
+        .catch(() => {});
+    },
     yiliaofun() {
       this.$router
         .push({ path: "/index", query: { name: "/medicalhealth" } })

+ 373 - 0
src/views/regulations/directoryinfo/index.vue

@@ -0,0 +1,373 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="目录" prop="directory">
+        <el-input
+          v-model="queryParams.directory"
+          placeholder="请输入目录"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="父目录ID" prop="parentId">
+        <el-input
+          v-model="queryParams.parentId"
+          placeholder="请输入父目录ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="祖级列表" prop="ancestors">
+        <el-input
+          v-model="queryParams.ancestors"
+          placeholder="请输入祖级列表"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="子分类" prop="subclassification">
+        <el-input
+          v-model="queryParams.subclassification"
+          placeholder="请输入子分类"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="文件数" prop="documentsNumber">
+        <el-input
+          v-model="queryParams.documentsNumber"
+          placeholder="请输入文件数"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="创建人姓名" prop="createUser">
+        <el-input
+          v-model="queryParams.createUser"
+          placeholder="请输入创建人姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="创建人ID" prop="createUserid">
+        <el-input
+          v-model="queryParams.createUserid"
+          placeholder="请输入创建人ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="修改人姓名" prop="updateUser">
+        <el-input
+          v-model="queryParams.updateUser"
+          placeholder="请输入修改人姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="修人姓名" prop="updateUserid">
+        <el-input
+          v-model="queryParams.updateUserid"
+          placeholder="请输入修人姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['regulations:directoryinfo:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['regulations:directoryinfo:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['regulations:directoryinfo:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['regulations:directoryinfo:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="directoryinfoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键ID" align="center" prop="id" />
+      <el-table-column label="目录" align="center" prop="directory" />
+      <el-table-column label="父目录ID" align="center" prop="parentId" />
+      <el-table-column label="祖级列表" align="center" prop="ancestors" />
+      <el-table-column label="子分类" align="center" prop="subclassification" />
+      <el-table-column label="文件数" align="center" prop="documentsNumber" />
+      <el-table-column label="创建人姓名" align="center" prop="createUser" />
+      <el-table-column label="创建人ID" align="center" prop="createUserid" />
+      <el-table-column label="修改人姓名" align="center" prop="updateUser" />
+      <el-table-column label="修人姓名" align="center" prop="updateUserid" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['regulations:directoryinfo:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['regulations:directoryinfo:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改规章制度目录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="目录" prop="directory">
+          <el-input v-model="form.directory" placeholder="请输入目录" />
+        </el-form-item>
+        <el-form-item label="父目录ID" prop="parentId">
+          <el-input v-model="form.parentId" placeholder="请输入父目录ID" />
+        </el-form-item>
+        <el-form-item label="子分类" prop="subclassification">
+          <el-input v-model="form.subclassification" placeholder="请输入子分类" />
+        </el-form-item>
+        <el-form-item label="文件数" prop="documentsNumber">
+          <el-input v-model="form.documentsNumber" placeholder="请输入文件数" />
+        </el-form-item>
+        <el-form-item label="创建人姓名" prop="createUser">
+          <el-input v-model="form.createUser" placeholder="请输入创建人姓名" />
+        </el-form-item>
+        <el-form-item label="创建人ID" prop="createUserid">
+          <el-input v-model="form.createUserid" placeholder="请输入创建人ID" />
+        </el-form-item>
+        <el-form-item label="修改人姓名" prop="updateUser">
+          <el-input v-model="form.updateUser" placeholder="请输入修改人姓名" />
+        </el-form-item>
+        <el-form-item label="修人姓名" prop="updateUserid">
+          <el-input v-model="form.updateUserid" placeholder="请输入修人姓名" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listDirectoryinfo, getDirectoryinfo, delDirectoryinfo, addDirectoryinfo, updateDirectoryinfo, exportDirectoryinfo } from "@/api/regulations/directoryinfo";
+
+export default {
+  name: "Directoryinfo",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 规章制度目录表格数据
+      directoryinfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        directory: null,
+        parentId: null,
+        ancestors: null,
+        subclassification: null,
+        documentsNumber: null,
+        createUser: null,
+        createUserid: null,
+        updateUser: null,
+        updateUserid: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询规章制度目录列表 */
+    getList() {
+      this.loading = true;
+      listDirectoryinfo(this.queryParams).then(response => {
+        this.directoryinfoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        directory: null,
+        parentId: null,
+        ancestors: null,
+        subclassification: null,
+        documentsNumber: null,
+        createUser: null,
+        createUserid: null,
+        createTime: null,
+        updateUser: null,
+        updateUserid: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加规章制度目录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getDirectoryinfo(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改规章制度目录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateDirectoryinfo(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addDirectoryinfo(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除规章制度目录编号为"' + ids + '"的数据项?').then(function() {
+        return delDirectoryinfo(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal.confirm('是否确认导出所有规章制度目录数据项?').then(() => {
+        this.exportLoading = true;
+        return exportDirectoryinfo(queryParams);
+      }).then(response => {
+        this.$download.name(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>

+ 387 - 0
src/views/regulations/fileinfo/index.vue

@@ -0,0 +1,387 @@
+<template>
+  <div class="flexlayout">
+    <!-- 文件区域 左边-->
+    <div class="tablesfile">
+      <div class="jichu">文件</div>
+      <table style="color:white" class="lefttable">
+        <tr>
+          <td class="tdfirst">1</td>
+          <td class="tdsecound">文件</td>
+          <td class="tdthird">
+            <div class="read">阅读</div>
+          </td>
+          <td class="tdfourth">
+            <a href="" download class="downloadfile">下载</a>
+          </td>
+        </tr>
+        <tr>
+          <td class="tdfirst">1</td>
+          <td class="tdsecound">文件</td>
+          <td class="tdthird">
+            <div class="read">阅读</div>
+          </td>
+          <td class="tdfourth">
+            <a href="" download class="downloadfile">下载</a>
+          </td>
+        </tr>
+        <tr>
+          <td class="tdfirst">1</td>
+          <td class="tdsecound">文件</td>
+          <td class="tdthird">
+            <div class="read">阅读</div>
+          </td>
+          <td class="tdfourth">
+            <a href="" download class="downloadfile">下载</a>
+          </td>
+        </tr>
+      </table>
+      <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+     
+    </div>
+    <!-- 右边 -->
+    <div style="right">
+      <!-- 目录 -->
+      <div class="catalog">
+        <div class="jichu">目录 <span class="uploadfilesbtn" @click="upload">上传文件</span><span class="manage">目录管理</span></div>
+        <el-table
+        v-loading="loading"
+        :data="lists"
+        @selection-change="handleSelectionChange"
+        :header-cell-style="{ background: '#003C69', color: 'white' }"
+      >
+    <el-table-column
+      label="序号"
+      type="index"
+      width="50"
+      >
+    </el-table-column>
+      <el-table-column label="目录" align="center" prop="name" />
+      <el-table-column label="子分类" align="center" prop="age" />
+      <el-table-column label="文件" align="center" prop="file" />
+      <el-table-column label="更新时间" align="center" prop="time" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="btu"
+            type="text"
+            @click="ViewProgress(scope.row)"
+          >
+            <span>添加</span>
+          </el-button>
+          <el-button
+            size="btd"
+            type="text"
+            @click="handleChakan(scope.row)"
+          >
+            <span class="chakan">删除</span>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+      </div>
+      <!-- 排行 -->
+      <div class="Ranking">
+        <div class="jichu">排行</div>
+        <table style="color:white">
+          <tr class="borderBottom">
+            <td class="numbers">1</td>
+            <td class="find">作战类</td>
+            <td class="readnumber">上周阅读量 2305</td>
+            <td class="thisweek">本周阅读量 <span style="color:red">2306</span></td>
+          </tr>
+           <tr class="borderBottom">
+            <td class="numbers">1</td>
+            <td class="find">作战类</td>
+            <td class="readnumber">上周阅读量 2305</td>
+            <td class="thisweek">本周阅读量 <span style="color:red">2306</span></td>
+          </tr>
+        </table>
+      </div>
+      <!-- 上传文件弹框 -->
+      <el-dialog
+      style="color:pink"
+      :title="title"
+      :visible.sync="open"
+      width="990px"
+      append-to-body
+      class="el-dialog__header"
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item  prop="catalog" class="change_plan_type">
+          <el-select
+            v-model="queryParams.catalog"
+            placeholder="请选择目录"
+            clearable
+            size="small"
+          >
+            <el-option label="周计划" value="week"></el-option>
+          <el-option label="月计划" value="month"></el-option>
+          <el-option label="年计划" value="year"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item  prop="category" class="change_plan_type">
+          <el-select
+            v-model="queryParams.category"
+            placeholder="请选择子分类"
+            ref="dict"
+            clearable
+            size="small"
+          >
+          <el-option label="周计划" value="week"></el-option>
+          <el-option label="月计划" value="month"></el-option>
+          <el-option label="年计划" value="year"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item style="margin-left: 30px">
+          <fileUpload v-model="form.file" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  listFileinfo,
+  getFileinfo,
+  delFileinfo,
+  addFileinfo,
+  updateFileinfo,
+  exportFileinfo,
+} from "@/api/regulations/fileinfo";
+
+export default {
+  name: "Fileinfo",
+  data() {
+    return {
+      list:[
+        {
+          id:1,file:"文件"
+        },
+        {
+          id:2,file:"文件"
+        },
+        {
+          id:3,file:"文件"
+        }
+      ],
+      lists:[{
+        id:1,name:"李四",age:20,file:"文件",time:2020
+      },{
+        id:2,name:"张三",age:20,file:"文件",time:2020
+      }
+      ],
+      total:10,
+      queryParams:{
+        pageNum: 1,
+        pageSize: 10,
+        catalog:"",
+        category:""
+        
+      },
+      open:false,
+      // 表单参数
+      form:{}
+    };
+  },
+  created() {},
+  methods: {
+    // 上传
+    upload(){
+      this.reset();
+      this.open = true;
+      this.title = "上传文件";
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.comstatus = 0;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {};
+    },
+    }
+};
+</script>
+<style scoped>
+.flexlayout{
+  width: 100vw;
+  height: 100vh;
+  /* background-color: pink; */
+}
+.jichu {
+  color: white;
+  width: 100%;
+  height: 40px;
+  line-height: 40px;
+  border-left: 4px solid rgba(29, 150, 255, 1);
+  text-indent: 1em;
+}
+/* 文件表格 */
+.tablesfile {
+  width: 1090px;
+  height: 960px;
+  background: #00365f;
+}
+/* 弹性布局 */
+.flexlayout {
+  display: flex;
+  justify-content: space-around;
+  align-items: flex-start;
+  width: 100%;
+  height: 100%;
+}
+/* 目录 */
+.catalog {
+  width: 700px;
+  height: 470px;
+  background-color: #00365f;
+}
+/* 排行 */
+.Ranking {
+  width: 700px;
+  height: 470px;
+  background-color: #00365f;
+  margin-top: 20px;
+
+}
+/* 下载按钮 */
+.downloadfile {
+  /* background-image: url("../../../images/uploads.png"); */
+  background: rgba(29, 150, 255, 1);
+  display: inline-block;
+  width: 67px;
+  height: 30px;
+  border-radius: 5px;
+  line-height: 30px;
+  text-align: center;
+  font-size: 14px;
+  margin-right: 10px;
+  /* margin-r */
+}
+/* 阅读 */
+.read {
+  color: #FFFFFF;
+  width: 46px;
+  height: 30px;
+  background-color: #1d96ff;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  line-height: 30px;
+  margin-right: 10px;
+  
+}
+/* 表格 */
+.tdfirst{
+  width: 60px;
+  text-align: center;
+}
+.tdsecound{
+  width: 880px;
+}
+.tdthird{
+  width: 70px;
+}
+.tdfourth{
+  width: 70px;
+}
+tr{
+  width: 100%;
+  height: 50px;
+}
+.lefttable tr:nth-child(even){
+  background-color: #00365f;
+}
+.lefttable tr:nth-child(odd){
+  background-color:rgb(0, 60, 105);
+}
+/* 表格 */
+.numbers{
+  width: 50px;
+  text-align: center;
+  /* background: pink; */
+  /* margin-left: 10px; */
+}
+.find{
+  /* background-color: skyblue; */
+  width: 200px;
+  text-align: center;
+}
+.readnumber{
+  width: 220px;
+  text-align: center;
+  /* background: pink; */
+}
+.thisweek{
+  width: 210px;
+  text-align: center;
+  /* background: pink; */
+}
+.borderBottom{
+  width: 100%;
+  height: 50px;
+  /* background-color: pink; */
+  border-bottom: 1px solid #718A9DFF;
+}
+table{
+  border-collapse:collapse;
+}
+/* 左边表格 */
+.lefttable tr{
+  width: 100%;
+  height: 60px;
+  background-color: pink;
+}
+/* 上传文件 */
+.uploadfilesbtn{
+  display: inline-block;
+  width: 86px;
+  height: 36px;
+  line-height: 36px;
+  background-color: #1d96ff;
+  color: white;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  margin-left: 450px;
+  padding-right: 10px;
+}
+/* 目录管理 */
+.manage{
+  display: inline-block;
+  width: 86px;
+  height: 36px;
+  line-height: 36px;
+  background-color: #1d96ff;
+  font-size: 14px;
+  border-radius: 4px;
+  margin-left: 10px; 
+}
+.el-el-dialog__header {
+  background-color: #004d86 !important;
+}
+</style>

+ 21 - 5
src/views/workingArrangements/planTask/index.vue

@@ -170,7 +170,13 @@
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="计划描述" align="center" prop="contents" />
+      <el-table-column
+        label="计划描述"
+        align="center"
+        prop="contents"
+        class="discrible"
+        show-overflow-tooltip
+      />
       <el-table-column
         label="操作"
         align="center"
@@ -1045,13 +1051,18 @@ export default {
     },
     unit3Format(row, column) {
       var deptName = "";
-      if (parseInt(this.planTaskList[0].common) == 1) {
+      // console.log(this.planTaskList[0])
+      if (
+        parseInt(this.planTaskList[0].common) == 1 ||
+        this.planTaskList[0].common == 2
+      ) {
         this.getdeptList.map((item) => {
           if (item.deptId == row.adminId) {
             deptName = item.deptName;
           }
         });
       } else if (parseInt(this.planTaskList[0].common) == 0) {
+        console.log(this.part);
         this.part[0].children.map((item) => {
           if (item.id == row.adminId) {
             deptName = item.label;
@@ -1169,8 +1180,6 @@ export default {
       let minute =
         date.getMinutes <= 9 ? "0" + date.getMinutes() : date.getMinutes();
       this.form.number = year + month + day + hour + minute;
-      console.log(111);
-      console.log(this.form.number);
     },
     // 获取发布单位id
     issueunit(id) {
@@ -1353,10 +1362,11 @@ export default {
   width: 940px;
   border: 1px solid #fff;
   border-radius: 4px;
-  height: 36px;
+  height: auto;
   line-height: 36px;
   text-indent: 1em;
   margin-bottom: 20px;
+  /* margin: auto; */
 }
 /* 完成进度 */
 .complue .el-input__inner {
@@ -1423,4 +1433,10 @@ export default {
 .vue-treeselect__single-value {
   color: white;
 }
+/* 文字多余部分省略 */
+.el-table__cell .cell {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 </style>

+ 322 - 105
src/views/workingArrangements/workTask/index.vue

@@ -130,7 +130,7 @@
         prop="adminId"
         :formatter="unit3Format"
       />
-     <el-table-column
+      <el-table-column
         label="任务类型"
         align="center"
         prop="type"
@@ -163,14 +163,19 @@
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="描述" align="center" prop="contents" />
+      <el-table-column label="描述" align="center" prop="contents" show-overflow-tooltip/>
       <el-table-column
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button size="btlook" type="text" @click="ViewProgress(scope.row)" v-if="scope.row.common == 1">
+          <el-button
+            size="btlook"
+            type="text"
+            @click="ViewProgress(scope.row)"
+            v-if="scope.row.common == 1"
+          >
             <span>进度录入</span>
           </el-button>
           <el-button
@@ -268,19 +273,18 @@
             style="width: 200px"
             clearable
             size="small"
-           
           >
             <el-option
               v-for="dict in dict.type.work_type"
               :key="dict.value"
               :label="dict.label"
               :value="dict.value"
-               @click.native="chooseplan"
+              @click.native="chooseplan"
             />
           </el-select>
         </el-form-item>
         <div>
-           <el-form-item label="执行人" prop="peopleName" label-width="100px">
+          <el-form-item label="执行人" prop="peopleName" label-width="100px">
             <div>
               <el-select
                 multiple
@@ -352,7 +356,71 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-     <!-- 进度查看弹框 -->
+    <!-- 进度录入弹框 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open1"
+      width="980px"
+      append-to-body
+      class="el-dialog__header"
+    >
+      <el-form
+        ref="Progress"
+        :model="Progress"
+        :rules="rules1"
+        label-width="100px"
+        :inline="true"
+      >
+        <div class="jiben">完成进度</div>
+        <el-form-item prop="planProgress">
+          <div>
+            <el-input-number
+              v-model="Progress.planProgress"
+              controls-position="right"
+              :min="0"
+              :max="100"
+            ></el-input-number>
+            <el-progress
+              :text-inside="true"
+              :stroke-width="24"
+              :percentage="Progress.planProgress"
+              color="rgba(41, 231, 205, 1)"
+              class="jinduProgress"
+            ></el-progress>
+          </div>
+        </el-form-item>
+        <div class="jiben">附件</div>
+        <el-form-item>
+          <fileUpload v-model="Progress.file" />
+        </el-form-item>
+        <div class="jiben">备注</div>
+        <el-form-item prop="remark">
+          <el-input
+            v-model="Progress.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
+        </el-form-item>
+        <div class="jiben">完成时间</div>
+        <el-form-item prop="accomplishTime">
+          <el-date-picker
+            class="comtimer"
+            clearable
+            size="small"
+            v-model="Progress.accomplishTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择完成时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm1">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 进度查看弹框 -->
     <el-dialog
       :title="title"
       :visible.sync="open2"
@@ -435,6 +503,101 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <!-- 进度查看1弹框 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open3"
+      width="980px"
+      append-to-body
+      class="el-dialog__header"
+    >
+      <el-form
+        ref="moreTable"
+        :model="moreTable"
+        :rules="rules"
+        label-width="100px"
+        :inline="true"
+      >
+        <div class="jiben">完成进度</div>
+        <el-progress
+          :text-inside="true"
+          :stroke-width="24"
+          :percentage="comstatus"
+          style="margin-bottom: 20px"
+          color="rgba(41, 231, 205, 1)"
+        ></el-progress>
+        <div class="jiben">任务周期</div>
+        <div class="thistext">
+          {{ moreTable.startTime }} 至 {{ moreTable.endTime }}
+        </div>
+        <!-- <div class="thistext"></div> -->
+        <div class="jiben">附件文档</div>
+        <el-form-item prop="file">
+          <!-- <el-input label="计划名称" v-model="ProgressLook.file" class="big" /> -->
+          <!-- <a :href="moreTable.file" download title="下载" style="color:white;margin-left:10px">下载附件</a> -->
+          <el-input
+            label="附件名称"
+            v-model="singleTable.fileName"
+            style="width: 820px"
+          />
+          <!-- <div>{{singleTableb.fileName}}</div> -->
+          <a
+            :href="moreTable.file"
+            download
+            title="下载"
+            style="color: white; margin-left: 10px"
+            class="downloadfile"
+            >下载附件</a
+          >
+        </el-form-item>
+        <div class="jiben">备注</div>
+        <div class="thistext">{{ moreTable.remark }}</div>
+        <div class="jiben">任务描述</div>
+        <div class="thistext">{{ moreTable.contents }}</div>
+        <div class="jiben">执行人信息</div>
+        <el-table
+          :data="moreTable.workProgresses"
+          border
+          style="width: 100%; background: #004d86"
+          class="tabless"
+        >
+          <el-table-column prop="peopleName" label="执行人" width="180">
+          </el-table-column>
+          <el-table-column label="任务周期" width="190">
+            <template slot-scope="scope">
+              <div>{{ scope.row.taskCycle }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="schedule" label="进度">
+            <template slot-scope="scope">
+              <el-progress
+                :text-inside="true"
+                :stroke-width="24"
+                :percentage="scope.row.schedule"
+                style="margin-bottom: 20px"
+                color="rgba(41, 231, 205, 1)"
+              ></el-progress>
+            </template>
+          </el-table-column>
+          <el-table-column prop="accomplishTime" label="完成时间" width="180">
+          </el-table-column>
+          <el-table-column label="状态" width="180">
+            <template slot-scope="scope">
+              <div>{{ scope.row.schedule == 100 ? "完成" : "未完成" }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="address" label="下载">
+            <template slot-scope="scope">
+              <a :href="scope.row.file" download>下载附件</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm2">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -446,9 +609,16 @@ import {
   addWorkTask,
   updateWorkTask,
   exportWorkTask,
+  singProgress,
+  moreProgress,
+  uploadProgress,
+} from "@/api/workingArrangements/workTask";
+import {
+  deptUser,
+  allUser,
+  getDept,
+  getDeptList,
 } from "@/api/workingArrangements/workTask";
-import {singProgress,moreProgress} from "@/api/workingArrangements/planTask";
-import { deptUser, allUser, getDept ,getDeptList} from "@/api/workingArrangements/workTask";
 import { getDicts } from "@/api/system/dict/data";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -515,6 +685,11 @@ export default {
       rules: {
         number: [{ required: true, message: "编号不能为空", trigger: "blur" }],
       },
+      rules1: {
+        planProgress: [
+          { required: true, message: "请输入完成进度", trigger: "blur" },
+        ],
+      },
       // 发布单位
       part: [],
       // 执行单位
@@ -526,13 +701,24 @@ export default {
       dictType: {
         dictType: "work_type",
       },
-      ziDian:[],
+      ziDian: [],
       // 部门列表
-      getdeptList:[],
+      getdeptList: [],
       // 单人进度查看框
-      singleTable:[],
+      singleTable: [],
       // 多人进度查看框
-      moreTable:[]
+      moreTable: [],
+
+      comstatus: 0,
+      // 进度录入参数
+      Progress: {
+        schedule: "",
+        file: "",
+        remark: "",
+        accomplishTime: "",
+        taskId: "",
+        id: "",
+      },
     };
   },
   created() {
@@ -543,23 +729,40 @@ export default {
     });
     this.getdict();
     this.chooseplan();
-    getDeptList().then((res)=>{
-      this.getdeptList=res.data
-    })
-   
+    getDeptList().then((res) => {
+      this.getdeptList = res.data;
+    });
+    // this.handleChakan()
   },
   methods: {
+    /** 进度录入按钮操作 */
+    ViewProgress(row) {
+      // this.reset();
+      this.open1 = true;
+      this.title = "进度录入";
+      this.jinduId = row.id;
+      singProgress(this.jinduId).then((res) => {
+        console.log(res.data);
+        this.Progress.id = res.data.workProgress.id;
+        this.Progress.taskId = res.data.id;
+        this.Progress.planProgress = res.data.workProgress.schedule;
+      });
+    },
     // 进度查看单人进度
     handleChakan(row) {
       this.reset();
       this.open2 = true;
       this.title = "进度查看";
       // 获取当前行的id
+      console.log(row.id);
       singProgress(row.id).then((res) => {
-        console.log(res)
-        // this.singleTable = res.data;
-        // this.singleTable.planProgresses =this.singleTable.planProgress.schedule;
-        // console.log(this.singleTable);
+        this.singleTable = res.data;
+        this.singleTable.planProgresses =
+          this.singleTable.workProgress.schedule;
+        this.Progress.id = this.singleTable.workProgress.id;
+        // console.log(this.Progress.id);
+        // this.singleTable.jindu=singleTable.planProgress.schedule
+        // console.log(this.singleTable)
       });
     },
     // 多人进度查看
@@ -571,10 +774,9 @@ export default {
       moreProgress(row.id).then((res) => {
         this.moreTable = res.data;
         console.log(this.moreTable);
-        this.moreTable.planProgresses.forEach((item) => {
+        this.moreTable.workProgresses.forEach((item) => {
           this.comstatus +=
-            item.schedule / this.moreTable.planProgresses.length;
-          // this.comstatus=0
+            item.schedule / this.moreTable.workProgresses.length;
         });
       });
     },
@@ -583,7 +785,6 @@ export default {
       this.loading = true;
       listWorkTask(this.queryParams).then((response) => {
         this.workTaskList = response.rows;
-        console.log(this.workTaskList)
         this.total = response.total;
         this.loading = false;
       });
@@ -645,7 +846,7 @@ export default {
       deptUser(id).then((res) => {
         // this.renYuan = res.data;
         this.executor = res.data;
-        console.log(this.executor)
+        console.log(this.executor);
       });
     },
     // 发布单位选中触发
@@ -656,10 +857,10 @@ export default {
     // 执行单位选中触发
     selectPeo1(val) {
       this.form.unitId = val.id;
-      this.form.peopleName=""
+      this.form.peopleName = "";
       this.getZhuChi(this.form.unitId);
     },
-    
+
     // 查询计划类型
     getdict() {
       getDicts(this.dictType.dictType).then((res) => {
@@ -671,12 +872,12 @@ export default {
       this.reset();
       this.open = true;
       this.title = "添加工作任务";
-    // 获取执行单位列表
-    getDept2().then((res) => {
-      // console.log(res,2)
-      this.users = res.data;
-      console.log(this.users);
-    });
+      // 获取执行单位列表
+      getDept2().then((res) => {
+        // console.log(res,2)
+        this.users = res.data;
+        console.log(this.users);
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -696,60 +897,51 @@ export default {
         this.title = "修改工作计划";
       });
     },
-     unit2Format(row, column) {
+    unit2Format(row, column) {
       var deptName = "";
-      if(parseInt(this.workTaskList[0].common)==1 || this.workTaskList[0].common==2){
+      if (
+        parseInt(this.workTaskList[0].common) == 1 ||
+        this.workTaskList[0].common == 2
+      ) {
         this.rylist.map((item) => {
-        row.peopleName.split(",").forEach((items, index) => {
-          if (item.userId == items) {
-            deptName += item.nickName + "  ";
-          }
+          row.peopleName.split(",").forEach((items, index) => {
+            if (item.userId == items) {
+              deptName += item.nickName + "  ";
+            }
+          });
         });
-      });
-      }else if(parseInt(this.workTaskList[0].common)==0){
+      } else if (parseInt(this.workTaskList[0].common) == 0) {
         this.rylist.map((item) => {
-        row.peopleName.split(",").forEach((items, index) => {
-          if (item.userId == items) {
-            deptName += item.nickName + " ";
-          }
+          row.peopleName.split(",").forEach((items, index) => {
+            if (item.userId == items) {
+              deptName += item.nickName + " ";
+            }
+          });
         });
-      });
       }
       return deptName;
-  
-      // var deptName = "";
-      // console.log(this.rylist)
-      // console.log(row)
-      // this.rylist.map((item) => {
-      //   row.peopleName.split(",").forEach((items, index) => {
-      //     if (item.deptId == items) {
-      //       deptName += item.nickName + " ";
-      //     }
-      //   });
-      // });
-      // return deptName;
     },
     unit3Format(row, column) {
       var deptName = "";
-      if(parseInt(this.workTaskList[0].common)==1){
-        console.log(111)
+      if (
+        parseInt(this.workTaskList[0].common) == 1 ||
+        this.workTaskList[0].common == 2
+      ) {
         this.getdeptList.map((item) => {
-          console.log(item.deptId)
-          console.log(row)
-         if (item.deptId == row.adminId) {
-          deptName = item.deptName;
-        }
-      });
-      }else if(parseInt(this.workTaskList[0].common)==0){
-       this.part[0].children.map((item) => {
-         if (item.id == row.adminId) {
-          deptName = item.label;
-        }
-      });
+          if (item.deptId == row.adminId) {
+            deptName = item.deptName;
+          }
+        });
+      } else if (parseInt(this.workTaskList[0].common) == 0) {
+        this.part[0].children.map((item) => {
+          if (item.id == row.adminId) {
+            deptName = item.label;
+          }
+        });
       }
       return deptName;
     },
-    unit4Format(row,column) {
+    unit4Format(row, column) {
       var deptName = "";
       this.ziDian.map((item) => {
         if (item.dictSort == row.type) {
@@ -763,20 +955,20 @@ export default {
       this.form.type = this.queryParams.type;
     },
     /** 提交按钮 */
-   submitForm() {
-     console.log(this.form)
-     this.$refs["form"].validate((valid) => {
-     if (valid) {
+    submitForm() {
+      console.log(this.form);
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
           if (this.form.adminId === this.form.unitId) {
             alert("发布单位和执行单位不能相同");
           } else {
             this.form.peopleName = this.form.peopleName.join(",");
             this.form.peopleId = this.form.peopleName;
-            console.log(this.form)
+            console.log(this.form);
             if (this.form.id != null) {
               updateWorkTask(this.form).then((response) => {
                 this.$modal.msgSuccess("修改成功");
-                this.queryParams.type=""
+                this.queryParams.type = "";
                 this.open = false;
                 this.getList();
               });
@@ -789,30 +981,49 @@ export default {
             }
           }
         }
-     })
+      });
       // this.$refs["form"].validate((valid) => {
-        // if (valid) {
-        //   this.form.peopleName = this.form.peopleName.join(",");
-        //   this.form.peopleId = this.form.peopleName;
-        //   console.log(this.form);
-        //   if (this.form.id != null) {
-        //     updateWorkTask(this.form).then((response) => {
-        //       this.$modal.msgSuccess("修改成功");
-        //       this.open = false;
-        //       this.getList();
-        //     });
-        //   } else {
-        //     addWorkTask(this.form).then((response) => {
-        //       this.$modal.msgSuccess("新增成功");
-        //       this.open = false;
-        //       this.getList();
-        //     });
-        //   }
-        // }
+      // if (valid) {
+      //   this.form.peopleName = this.form.peopleName.join(",");
+      //   this.form.peopleId = this.form.peopleName;
+      //   console.log(this.form);
+      //   if (this.form.id != null) {
+      //     updateWorkTask(this.form).then((response) => {
+      //       this.$modal.msgSuccess("修改成功");
+      //       this.open = false;
+      //       this.getList();
+      //     });
+      //   } else {
+      //     addWorkTask(this.form).then((response) => {
+      //       this.$modal.msgSuccess("新增成功");
+      //       this.open = false;
+      //       this.getList();
+      //     });
+      //   }
+      // }
       // });
     },
-    submitForm2(){
-
+    submitForm1() {
+      this.$refs["Progress"].validate((valid) => {
+        if (valid) {
+          this.Progress.taskId = this.jinduId;
+          this.Progress.schedule = this.Progress.planProgress;
+          console.log(this.Progress);
+          uploadProgress(this.Progress).then((res1) => {
+            console.log(res1);
+            this.$modal.msgSuccess("上传成功");
+            // this.Progress
+            this.reset();
+            this.open1 = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    submitForm2() {
+      this.comstatus = 0;
+      this.open2 = false;
+      this.open3 = false;
     },
     /** 删除按钮操作 */
     handleDelete(row) {
@@ -853,7 +1064,7 @@ export default {
     getdeptlist() {
       getDeptList().then((res) => {
         this.ExecutableUnit = res.data;
-        console.log(this.ExecutableUnit)
+        console.log(this.ExecutableUnit);
       });
     },
     // 选中执行人id
@@ -864,7 +1075,7 @@ export default {
     //     this.executor = res.data;
     //   });
     // },
-    
+
     // 计划编号
     planName() {
       let date = new Date();
@@ -881,7 +1092,7 @@ export default {
       console.log(111);
       console.log(this.form.number);
     },
-     // 获取发布单位id
+    // 获取发布单位id
     issueunit(id) {
       this.form.adminId = id;
     },
@@ -1052,7 +1263,7 @@ export default {
   width: 940px;
   border: 1px solid #fff;
   border-radius: 4px;
-  height: 36px;
+  height: auto !important;
   line-height: 36px;
   text-indent: 1em;
   margin-bottom: 20px;
@@ -1122,4 +1333,10 @@ export default {
 .vue-treeselect__single-value {
   color: white;
 }
+/* 文字多余部分省略 */
+.el-table_1_column_8 .cell {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 </style>