lsw 1 year ago
parent
commit
054115f499

+ 3 - 12
admin-ui/src/views/work/contract/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent >
       <el-form-item label="合同名称" prop="name">
         <el-input v-model="queryParams.name" placeholder="请输入合同名称" @keyup.enter.native="handleQuery" clearable />
       </el-form-item>
@@ -9,14 +9,8 @@
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-row :gutter="10" class="mb8">
-      <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit', ids)" v-hasPermi="['work:contract:edit']">修改</el-button>
-      <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:contract:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-    <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="合同名称" align="left" prop="name" />
+    <el-table :data="response.rows" border height="calc(100vh - 270px)">
+      <el-table-column label="合同名称" align="center" prop="name" />
       <el-table-column label="合同状态" align="center" prop="state" width="130">
         <template slot-scope="scope">
           <el-tag type="success" v-if="scope.row.state == 0">启用</el-tag>
@@ -27,7 +21,6 @@
       <el-table-column label="操作" align="center" width="200">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:contract:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:contract:remove']">删除</el-button>
         </template>
       </el-table-column>
       <template slot="empty">
@@ -44,8 +37,6 @@ export default {
   name: 'Contract',
   data() {
     return {
-      ids: [],
-      showSearch: true,
       response: {},
       queryParams: {
         pageNum: 1,

+ 1 - 1
admin-ui/src/views/work/project/index.vue

@@ -121,7 +121,7 @@ export default {
     },
     op(tag, row) {
       if (tag == 'add') {
-        this.iframe({ obj: edit, param: {}, title: '新增项目', width: '55%', height: '55%' });
+        this.iframe({ obj: edit, param: {}, title: '新增项目', width: '50%', height: '50%' });
         return;
       }
       const id = row.id || this.ids[0];

+ 3 - 3
admin-ui/src/views/work/user/index.vue

@@ -21,7 +21,7 @@
     </el-row>
     <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="姓名" align="center" prop="name" width="130" />
+      <el-table-column label="姓名" align="center" prop="name" width="110" />
       <el-table-column label="性别" align="center" prop="sex" width="80" />
       <el-table-column label="身份证" align="center" prop="idCard" />
       <el-table-column label="手机号" align="center" prop="phone" width="130" />
@@ -36,7 +36,6 @@
         <template slot-scope="scope">
           <el-tag type="danger" v-if="scope.row.isContract == 0">未签署</el-tag>
           <el-tag type="success" v-if="scope.row.isContract == 1">已签署</el-tag>
-          <span class="pon" @click="op('contract', scope.row)">查看</span>
         </template>
       </el-table-column>
       <el-table-column label="关联企业数" align="center" prop="isCompany" width="120" />
@@ -50,8 +49,9 @@
         </template>
       </el-table-column>
       <el-table-column label="注册日期" align="center" prop="createTime" width="160" />
-      <el-table-column label="操作" align="center" width="200">
+      <el-table-column label="操作" align="center" width="220">
         <template slot-scope="scope">
+          <el-button size="mini" type="text" icon="el-icon-document" @click="op('contract', scope.row)" v-if="scope.row.isContract == 1">查看合同</el-button>
           <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:user:list']">详情</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:user:remove']">删除</el-button>
         </template>

+ 0 - 14
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/ContractController.java

@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -40,13 +39,6 @@ public class ContractController extends BaseController {
         return AjaxResult.success(contractService.getById(id));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:contract:add')")
-    @Log(title = "合同模板", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    public AjaxResult add(@RequestBody Contract contract) {
-        return toAjax(contractService.save(contract));
-    }
-
     @PreAuthorize("@ss.hasPermi('work:contract:edit')")
     @Log(title = "合同模板", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
@@ -54,10 +46,4 @@ public class ContractController extends BaseController {
         return toAjax(contractService.updateById(contract));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:contract:remove')")
-    @Log(title = "合同模板", businessType = BusinessType.DELETE)
-    @GetMapping("/remove/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(contractService.removeByIds(Arrays.asList(ids)));
-    }
 }

+ 0 - 7
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/UserController.java

@@ -44,13 +44,6 @@ public class UserController extends BaseController {
         return AjaxResult.success(userService.getById(id));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:user:add')")
-    @Log(title = "用户管理", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    public AjaxResult add(@RequestBody User user){
-        return toAjax(userService.save(user));
-    }
-
     @PreAuthorize("@ss.hasPermi('work:user:edit')")
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")