From 3a17ca6a6da05ccb49f71d432c061eaae237b5bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com>
Date: Thu, 6 Jul 2023 15:38:31 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E9=A2=98=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../static/js/jlw/resourcesQuestion/index.js       | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js b/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js
index cb5e8a33..39808e45 100644
--- a/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js
+++ b/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js
@@ -64,18 +64,14 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
                         }
                     },
                     {
-                        field: 'userId', title: '操作', align: "center", width: 220, templet: function (d) {
-                            var css = isAdmin ? "" : "display: none;";
-                            var cssN = isAdmin ? "display: none;" : "";
+                        field: 'userId', title: '操作', align: "center", width: 220, style:"text-align: left", templet: function (d) {
                             let htm = '<a class="layui-table-link" lay-event="up" data-item="${JSON.stringify(d)}" >上架</a>\n' +
                                 '<a class="layui-table-link" lay-event="down" data-item="${JSON.stringify(d)}" style="color: #bebebe!important">下架</a>';
-
-                            if((d.addType == 'FACULTY_ADD' && !isAdmin)||(d.addType == 'ADMIN_ADD' && isAdmin)){
-                                htm += '<a class="layui-table-link" lay-event="edit" style="' + css + '">编辑</a>\n' +
-
-                                '<a class="layui-table-link" lay-event="del" style="' + css + '">删除</a>';
+                            if((d.sourceType == '2' && isAdmin) || (d.sourceType == '1' && !isAdmin)){
+                                htm += '<a class="layui-table-link" lay-event="edit">编辑</a>\n' +
+                                '<a class="layui-table-link" lay-event="del">删除</a>';
                             }else{
-                                htm += '<a class="layui-table-link" lay-event="edit" style="' + cssN + '">查看</a>';
+                                htm += '<a class="layui-table-link" lay-event="edit">查看</a>';
                             }
 
                             // TODO 上下架前端逻辑待开发