Browse Source

新增工程信息宣传

李顺 3 years ago
parent
commit
5e1b657a36

+ 7 - 1
src/common/AjaxSend.class.ts

@@ -8,7 +8,13 @@ class AjaxSend {
     filterXss
     constructor() {
         this.verificationHelper = new VerificationHelper();
-        this.filterXss=new filterXSS.FilterXSS()
+        this.filterXss=new filterXSS.FilterXSS({
+            onIgnoreTagAttr:(tag, name, value, isWhiteAttr)=>{
+                if(name==="style"){
+                    return name+"='"+value+"'";
+                }
+            }
+        })
     }
     public type = {
         post: "POST",

+ 2 - 0
src/index.html

@@ -95,6 +95,7 @@
     <script type="text/javascript" src="./vendor/crypto-js-4.0.0/mode-ecb.js" charset="utf-8"></script>
     <script type="text/javascript" src="./vendor/crypto-js-4.0.0/tripledes.js" charset="utf-8"></script>
     <script type="text/javascript" src="./vendor/js-xss-1.0.8/xss.min.js"></script>
+    <script type="text/javascript" src="./vendor/wangEditor-4.7.8/dist/wangEditor.min.js"></script>
     <script type="text/javascript" src="./vendor/require/require.min.js"></script>
     <script src="./vendor/ext_cesium/tools/tools.min.js" type="text/javascript"></script>
     <script src="./vendor/jspdf/html2canvas-0.4.1.js" type="text/javascript"></script>
@@ -106,6 +107,7 @@
     <script type="text/javascript" src="./vendor/jquery-pagination-2.1.5/js/pages.js"></script>
     
     
+    
     <script>
         require(["./main.js"]);
     </script>

File diff suppressed because it is too large
+ 6757 - 0
src/newsPage/css/bootstrap.css


BIN
src/newsPage/css/img/logo.png


+ 67 - 0
src/newsPage/css/login.css

@@ -0,0 +1,67 @@
+* {
+    margin: 0;
+    padding: 0;
+}
+html,
+body {
+    height: 100%;
+    width: 100%;
+    /*font-family: 微软雅黑, Verdana, Geneva, Tahoma, sans-serif;*/
+    font-family: "宋体";
+    overflow: hidden;
+    background-color: #eeeeee;
+}
+font[size="4"]{
+    font-size: 16px;
+}
+.header{
+    background: #fff;
+    height:66px;
+    line-height: 66px;
+    margin-bottom: 8px;
+}
+.content-con{
+    width:100%;
+    height:calc(100% - 74px);
+    overflow: auto;
+}
+.content-container{
+    min-height:100%;
+    width:72.9%;
+    background-color: #fff;
+    margin: 0 auto;
+    padding:1.5rem 4rem;
+}
+.title{
+    text-align: center;
+    
+}
+.title h2{
+    margin-bottom: 1.5rem;
+    font-weight: bold;
+}
+.creator{
+    text-align: center;
+}
+.creator .department{
+    margin-right: 2.0rem;
+}
+@media screen and (max-width:600px) {
+    .content-container{
+        min-height:100%;
+        width:100%;
+        background-color:#fff;
+        margin: 0 auto;
+        padding:1.5rem 1.5rem;
+    }
+    .creator .department{
+        display: block;
+    }
+    p img{
+        width:100%;
+        height:100%;
+    }
+    h2{
+        font-size:1.5rem;
+    }
+}

+ 37 - 0
src/newsPage/index.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <title>长江大保护GIS+BIM数字管网系统</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
+    <link rel=”icon” href=”favicon.ico” mce_href=”/dir/favicon.ico” type=”image/x-icon”>
+    <link type="text/css" rel="stylesheet" href="../vendor/bootstrap-4.0.0/css/bootstrap.min.css">
+    <link type="text/css" rel="stylesheet" href="./css/login.css">
+</head>
+
+<body>
+    <div class="header">
+        <img src="css/img/logo.png">
+    </div>
+    <div class="content-con">
+        <div class="content-container">
+            <div class="title-con">
+                <div class="title"></div>
+                <div class="creator">
+                    <span class="department"></span>
+                    <span class="publishtime"></span>
+                </div>
+                <hr/>
+            </div>
+            <div class="content"></div>
+        </div>
+    </div>
+</body>
+<script type="text/javascript" src="../vendor/jquery-3.3.1/jquery.min.js"></script>
+<script type="text/javascript" src="../vendor/js-security/sha1.js"></script>
+<script type="text/javascript" src="../vendor/js-cookie-2.1.3/cookie.min.js"></script>
+<script type="text/javascript" src="../vendor/require/require.min.js"></script>
+<script type="text/javascript" src="./js/login.js"></script>
+
+</html>

+ 63 - 0
src/newsPage/js/login.js

@@ -0,0 +1,63 @@
+
+
+/* CONFIGURE START */
+var API_ADDR = "",
+    SYS_ADDR = location.origin,
+    COOKIE_EXPIRES = 1,
+    COOKIE_PATH = location.pathname.replace(/login\/+$/, "");
+var configurejs = SYS_ADDR + "/configure.js";
+//const mydeskUrl="http://10.37.5.54:8080/UAC/sso/login";
+/* CONFIGURE END */
+require([configurejs], function (AppX) {
+    API_ADDR = AppX.appConfig.apiRoot;
+    load();
+})
+function load() {
+    const search = window.location.search;
+    if(!search) return;
+    const token = getSearchString('token', search);
+    const id = getSearchString('id', search);
+    $.ajax({
+        url: API_ADDR + '/tofly-sxgk/cInfoPublish/getInfoById?publishId='+id,
+        type: "GET",
+        success: ajaxCallBack.bind(this),
+        error: errorCallBack.bind(this)
+    });
+    function getSearchString(key, Url) {
+        var str = Url;
+        str = str.substring(1, str.length); // 获取URL中?之后的字符(去掉第一位的问号)
+        // 以&分隔字符串,获得类似name=xiaoli这样的元素数组
+        var arr = str.split("&");
+        var obj = new Object();
+        // 将每一个数组元素以=分隔并赋给obj对象
+        for (var i = 0; i < arr.length; i++) {
+            var tmp_arr = arr[i].split("=");
+            obj[decodeURIComponent(tmp_arr[0])] = decodeURIComponent(tmp_arr[1]);
+        }
+        return obj[key];
+    }
+
+    function ajaxCallBack(result) {
+        const text=$('<div>').html(result.result.content).html();
+        $('body .title').append("<h2>"+result.result.title+"</h2>");
+        $('body .content').append(text);
+        $('body .department').text("发布单位:"+result.result.publishDept);
+        $('body .publishtime').text("发布时间:"+result.result.publishTime);
+    }
+
+    function errorCallBack(mesg) {
+        hideLoading();
+        console.log(mesg);
+    }
+
+    /**
+     * 获取cookies值
+     */
+    function getCookies(name) {
+        var tempName = Cookies.get(hex_sha1(name));
+        if (tempName)
+            return Secret_Key(Cookies.get(hex_sha1(name)), 'decryption');
+        else
+            return "";
+    }
+}

File diff suppressed because it is too large
+ 0 - 4
src/vendor/wangEditor/wangEditor.min.js


+ 2 - 2
src/widgets/PipeUnitInfo/Widget.ts

@@ -873,7 +873,7 @@ class PipeUnitInfo extends BaseWidget {
                         //添加部件类型
                         let config = gl.config.pipeUnitInfo;
                         config.baseInfo = baseInfo;
-                        const title = dataset.title + ' ' + attrs["PIPE_ID"];
+                        const title = attrs["TYPE"] + ' ' + attrs["PIPE_ID"];
                         const pbsCode = attrs["CODE"];
                         if (!gl.isInteractive) {
                             gl.location(geometry, function () {
@@ -934,7 +934,7 @@ class PipeUnitInfo extends BaseWidget {
                         //添加部件类型
                         let config = gl.config.pipeUnitInfo;
                         config.baseInfo = baseInfo;
-                        const title = dataset.title + ' ' + attrs["PIPE_ID"];
+                        const title = attrs["TYPE"] + ' ' + attrs["PIPE_ID"];
                         const pbsCode = attrs["CODE"];
                         //if (!gl.isInteractive) {
                             gl.location(geometry, function () {

+ 1 - 1
src/widgets/Popup/Widget.ts

@@ -167,7 +167,7 @@ class Popup extends BaseWidget {
             this.contentconObj.css({'height':"calc(100% - 90px)"});
         } 
         else {
-            //this.domObj.find("#toolbar").show();
+            this.domObj.find("#toolbar").show();
             this.contentbtnObj.css('height','70px');
             this.contentconObj.css({'height':"calc(100% - 130px)"});
         }

+ 88 - 0
src/widgets/ProjectNewsManagement/Widget.html

@@ -0,0 +1,88 @@
+<div class="widget-ProjectNewsManagement">
+  <div class="tableTools row">
+    <div class="col-2">
+      <div class="input-group">
+        <input class="form-control" type="text" placeholder="支持搜索标题" id="seachTitle">
+        <div class="input-group-append">
+          <button class="btn btn-primary" id="titleSearchBtn"><i class="fa fa-search"></i></button>
+        </div>
+      </div>
+    </div>
+    <div class="col-2">
+      <label for="searchProjSel">项目:</label>
+      <select id="searchProjSel" class="form-control">
+        <option></option>
+      </select>
+    </div>
+    <div class="col-2">
+      <label for="searchNewsStatue">发布状态:</label>
+      <select id="searchNewsStatue" class="form-control">
+        <option></option>
+        <option value="1">草稿</option>
+        <option value="2">已发布</option>
+        <option value="3">撤销</option>
+      </select>
+    </div>
+    <div class="col-2 searchUserContainer">
+      <label for="searchCreator">发布人:</label>
+      <select id="searchCreator" class="form-control">
+        <option value=""></option>
+      </select>
+    </div>
+    <div class="col-2">
+      <label for="searchDatetime">发布时间:</label>
+      <input type="text" placeholder="选择日期范围" class="datapicker form-control" id="searchDatetime">
+      <i class="fa fa-remove dateClear" id="dateClearBtn"></i>
+    </div>
+    <div class="col-2">
+      <div class="btn-group">
+        <!-- <button class="btn btn-success" id="resetBtn">重置</button> -->
+        <button class="btn btn-success" id="searchBtn">查询</button>
+        <button class="btn btn-success" id="addBtn">新增</button>
+        <button class="btn btn-success" id="publishBtn">发布</button>
+        <!-- <button class="btn btn-success" id="qrcodeBtn">二维码</button> -->
+      </div>
+    </div>
+  </div>
+  <div class="tbContainer">
+    <table id="newTb" class="table table-striped table-condensed table-hover table-bordered"></table>
+  </div>
+</div>
+$$
+<div class="editContainer">
+  <div class="form-group row">
+    <label class="col-2">项目</label>
+    <div class="col-8">
+      <select class="form-control" id="prjSel">
+      </select>
+    </div>
+  </div>
+  <div class="form-group row">
+    <label class="col-2">标题</label>
+    <div class="col-8">
+      <textarea class="form-control" id="titleInput"></textarea>
+    </div>
+  </div>
+  <div class="form-group row">
+    <label class="col-2">发布人</label>
+    <div class="col-8">
+      <input class="form-control" type="text" id="newsCreator">
+    </div>
+  </div>
+  <div class="form-group row">
+    <label class="col-2">发布单位</label>
+    <div class="col-8">
+      <input class="form-control" type="text" id="newsDepartment">
+    </div>
+  </div>
+  <div id="richEditor">
+  
+  </div>
+</div>
+<div class="editBtns">
+  <button class="btn btn-primary editPreviewBtn">预览</button>
+  <button class="btn btn-primary saveDraft">保存草稿</button>
+  <button class="btn btn-primary savePublish">发布</button>
+</div>
+
+

+ 961 - 0
src/widgets/ProjectNewsManagement/Widget.ts

@@ -0,0 +1,961 @@
+import BaseWidget = require('core/BaseWidget.class');
+declare var InfoWindow;
+declare var videojs;
+declare var wangEditor;
+declare var filterXSS;
+/**
+ * 视频监控模块
+ */
+class ProjectNewsManagement extends BaseWidget {
+    baseClass = "widget-ProjectNewsManagement";
+    handler = null;
+    _tableID = "newTb";
+    infoWindow: any;
+    gifLayer: any;
+    prjSelID = "prjSel";
+    titleInputID = "titleInput";
+    newsCreatorID = "newsCreator";
+    newsDepartmentID = "newsDepartment";
+    searchProjSelID = "searchProjSel";
+    resetBtnID = "resetBtn";
+    searchBtnID = "searchBtn";
+    searchNewsStatueID = "searchNewsStatue";
+    searchCreatorID = "searchCreator";
+    searchDatetimeID = "searchDatetime";
+    searchTitleID = "seachTitle";
+    publishBtnID = "publishBtn";
+    qrcodeBtnID = "qrcodeBtn";
+    dateClearBtnID = "dateClearBtn";
+    _listTable = null;
+
+    _apiUrls = {
+        getUserInfoApi: "/base/user/getInfo",//登录用户信息
+        projectList: "/tofly-sxgk/areacompany/pageFilterUser",//用户绑定项目
+        addNews: "/tofly-sxgk/cInfoPublish/saveOrUpdate",//保存更新新闻
+        newsList: "/tofly-sxgk/infopublish/page",//分页查询
+        userList: "/base/user/pageNew",//用户分页查询
+        delNews: "/tofly-sxgk/infopublish/",//删除新闻
+        getByID: "/tofly-sxgk/infopublish/",//获取新闻信息
+        uploadImg: "/tofly-sxgk/uploadSeparately/getInfoWithUpdateAddFile",//富文本编辑器上传文件
+        viewImg: "/base/file/loadImgWithNoAuth",//免权限查看图片
+        setStatus: "/tofly-sxgk/cInfoPublish/statusModify",//设置新闻状态
+        qrcodeView: "/tofly-sxgk/cInfoPublish/getOneQrcodeUrl"//新闻二维码
+    };
+    /**
+     * 启动
+     */
+    startup() {
+        this.setHtml(this.template.split("$$")[0]);
+        this.initPbsModuleList();
+        this.initEvent();
+    }
+    /**
+     * 按钮事件
+     */
+    initEvent() {
+        this.domObj.find('#addBtn').off('click').on('click', this.addNews.bind(this));
+
+        this.domObj.find("#searchBtn").off('click').on('click', this.searchList.bind(this));
+        this.domObj.find("#titleSearchBtn").off('click').on('click', this.searchList.bind(this));
+        this.domObj.find("#seachTitle").off('keydown').on('keydown', e => {
+            if (e.keyCode === 13) {
+                this.searchList();
+            }
+        })
+        this.domObj.find('#' + this.publishBtnID).off('click').on('click', e => {
+            if (!this._listTable) {
+                this.toast.show('工程信息列表未初始化');
+                return;
+            }
+            const currentSelect = this._listTable.rows('.active').data();
+            const id = currentSelect[0].id.toString();
+            if (currentSelect[0].status === 2) {
+                this.toast.show("该工程信息已发布");
+                return;
+            }
+            this.publishNews(id);
+        });
+        this.initSearchElement();
+    }
+    /**
+     * 该方法用于初始化搜索条件
+     * 
+     */
+    initSearchElement() {
+        //项目列表
+        this.initProjectList(this.domObj.find("#" + this.searchProjSelID), false, null);
+        //人员列表
+        this.initUserList(this.domObj.find("#" + this.searchCreatorID), null);
+        //发布状态
+        this.domObj.find("#" + this.searchNewsStatueID).select2({
+            language: "zh-CN",
+            width: "element",
+            dropdownCssClass: "userManagementPopupDep",
+            allowClear: true,
+            placeholder: '---请选择---',
+            placeholderOption: "first"
+        });
+        //日期范围
+        this.initDateRangePicker();
+    }
+    /**
+     * 发布
+     */
+    publishNews(id: string) {
+
+        this.popup.setSize(400, 200);
+        const popup = this.popup.show("发布", "<div style='text-align:center;'>确认是否发布工程信息?</div>");
+        popup.submitObj.off('click').on('click', (e) => {
+            const url = this._apiUrls.setStatus;
+            this.baseAjaxSend.sendAjax(this, { ids: id, status: "2" }, url, "POST", (result) => {
+                if (result.code === 1) {
+                    this.toast.show("发布成功");
+                    this.popup.close();
+                    this.searchList();
+                } else {
+                    this.toast.show("发布失败,请联系管理员");
+                }
+            }, err => {
+                this.toast.show("发布失败,请联系管理员")
+            })
+        })
+    }
+    /**
+     * 撤销新闻
+     */
+    revokeNews(id) {
+        this.popup.setSize(400, 200);
+        const popup = this.popup.show("撤销", "<div style='text-align:center;'>确认是否撤销工程信息?</div>");
+        popup.submitObj.off('click').on('click', (e) => {
+            const url = this._apiUrls.setStatus;
+            this.baseAjaxSend.sendAjax(this, { ids: "" + id + "", status: "3" }, url, "POST", (result) => {
+                if (result.code === 1) {
+                    this.toast.show("撤销成功");
+                    this.popup.close();
+                    this.searchList();
+                } else {
+                    this.toast.show("撤销失败,请联系管理员");
+                }
+            }, err => {
+                this.toast.show("撤销失败,请联系管理员")
+            })
+        })
+    }
+    /**
+     * 该方法用于搜索列表
+     */
+    searchList() {
+        if (this._listTable) {
+            this._listTable.ajax.reload(null, false);
+        } else {
+            this.toast.show("宣传信息列表未初始化");
+        }
+
+    }
+    /**
+     * 该方法用于新增新闻
+     */
+    addNews() {
+        const height = this.domObj.height();
+        const width = this.domObj.width() / 2;
+        this.popup.setSizeWithoutBtns(width, height);
+        const popup = this.popup.show("创作文章", this.template.split('$$')[1], true);
+
+        const editor = this.initEditor(popup);
+        let newsID = null;
+        this.initUserInfo(popup);
+        const sel = popup.domObj.find("#" + this.prjSelID);
+        this.initProjectList(sel, true, this.AppX.appConfig.currentPrj);
+        //预览
+        popup.domObj.find('.editPreviewBtn').off("click").on("click", (ev) => {
+            const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+            const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+            const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+            //const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+            const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+            //const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+            const xsscontent = editor.txt.html();
+            //防XSS攻击
+            const filterXss = new filterXSS.FilterXSS({
+                onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                    if (name === "style") {
+                        return name + "='" + value + "'";
+                    }
+                }
+            });
+            const content = filterXss.process(xsscontent);
+            const newWindow = window.open(this.root + "/newsPage/index.html");
+            
+            
+            newWindow.onload=(hand)=>{
+                const newPage=hand.currentTarget.document;
+                const text = $('<div>').html(content).html();
+                $(newPage.body).find('.title').append("<h2>" + title + "</h2>");
+                $(newPage.body).find('.content').append(text);
+                $(newPage.body).find('.department').text("发布单位:" + department);
+                $(newPage.body).find('.publishtime').text("发布时间:");
+            };
+            
+        })
+        //保存草稿
+        popup.domObj.find('.saveDraft').off("click").on("click", (ev) => {
+            const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+            const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+            const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+            const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+            const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+            const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+            const xsscontent = editor.txt.html();
+            //防XSS攻击
+            const filterXss = new filterXSS.FilterXSS({
+                onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                    if (name === "style") {
+                        return name + "='" + value + "'";;
+                    }
+                }
+            });
+            const content = filterXss.process(xsscontent);
+            if (prjID === "" || title === "" || creator === "" || department === "" || content === "") {
+                this.toast.show('请完善发布信息');
+                return;
+            }
+            const data = {
+                "id": newsID,
+                "prjId": prjID,
+                "title": title,
+                "content": content,
+                "status": 1,
+                "publishPerson": creator,
+                "publishDept": department
+            };
+            const url = this._apiUrls.addNews;
+            this.baseAjaxSend.sendAjax(this, data, url, "POST", result => {
+                if (result.code === 1) {
+                    this.toast.show("保存成功");
+                    newsID = result.result.id;
+                    //this.popup.close();
+                    this.searchList();
+                } else {
+                    this.toast.show("保存失败");
+                }
+            }, err => {
+                this.toast.show("保存失败");
+            })
+        });
+        //发布
+        popup.domObj.find('.savePublish').off("click").on("click", (ev) => {
+            const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+            const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+            const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+            const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+            const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+            const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+            const xsscontent = editor.txt.html();
+            //防XSS攻击
+            const filterXss = new filterXSS.FilterXSS({
+                onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                    if (name === "style") {
+                        return name + "='" + value + "'";;
+                    }
+                }
+            });
+            const content = filterXss.process(xsscontent);
+            if (prjID === "" || title === "" || creator === "" || department === "" || content === "") {
+                this.toast.show('请完善发布信息');
+                return;
+            }
+            const data = {
+                "id": newsID,
+                "prjId": prjID,
+                "title": title,
+                "content": content,
+                "status": 1,
+                "publishPerson": creator,
+                "publishDept": department
+            };
+            const url = this._apiUrls.addNews;
+            this.baseAjaxSend.sendAjax(this, data, url, "POST", result => {
+                if (result.code === 1) {
+                    newsID = result.result.id;
+                    //发布
+                    const url = this._apiUrls.setStatus;
+                    this.baseAjaxSend.sendAjax(this, { ids: "" + newsID + "", status: "2" }, url, "POST", (result) => {
+                        if (result.code === 1) {
+                            this.toast.show("发布成功");
+                            this.popup.close();
+                            this.searchList();
+                        } else {
+                            this.toast.show("发布失败,请联系管理员");
+                        }
+                    }, err => {
+                        this.toast.show("发布失败,请联系管理员")
+                    })
+                } else {
+                    this.toast.show("保存失败");
+                }
+            }, err => {
+                this.toast.show("保存失败");
+            })
+        });
+    }
+    /**
+     * 该方法用于编辑工程信息
+     * @param id 新闻ID
+     */
+    editNews(id) {
+        const url = this._apiUrls.getByID + id;
+        this.baseAjaxSend.sendAjax(this, { id: id }, url, "GET", (result) => {
+            const data = result.result;
+            const height = this.domObj.height();
+            const width = this.domObj.width() / 2;
+            this.popup.setSizeWithoutBtns(width, height);
+            const popup = this.popup.show("编辑", this.template.split('$$')[1], true);
+
+            const editor = this.initEditor(popup);
+            let newsID = data.id;
+            //填充内容
+            popup.domObj.find("#" + this.newsCreatorID).val(data.publishPerson);
+            //popup.domObj.find("#" + this.newsCreatorID).data('userid', data.id);
+            popup.domObj.find("#" + this.newsDepartmentID).val(data.publishDept);
+            //popup.domObj.find("#" + this.newsDepartmentID).data("partid", data.departmentId);
+            const title = popup.domObj.find("#" + this.titleInputID).val(data.title);
+            editor.txt.html(data.content);
+            const sel = popup.domObj.find("#" + this.prjSelID);
+            this.initProjectList(sel, true, data.prjId);
+            //预览
+            popup.domObj.find('.editPreviewBtn').off("click").on("click", (ev) => {
+                const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+                const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+                const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+                //const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+                const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+                //const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+                const xsscontent = editor.txt.html();
+                //防XSS攻击
+                const filterXss = new filterXSS.FilterXSS({
+                    onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                        if (name === "style") {
+                            return name + "='" + value + "'";
+                        }
+                    }
+                });
+                const content = filterXss.process(xsscontent);
+                const newWindow = window.open(this.root + "/newsPage/index.html");
+                
+                
+                newWindow.onload=(hand)=>{
+                    const newPage=hand.currentTarget.document;
+                    const text = $('<div>').html(content).html();
+                    $(newPage.body).find('.title').append("<h2>" + title + "</h2>");
+                    $(newPage.body).find('.content').append(text);
+                    $(newPage.body).find('.department').text("发布单位:" + department);
+                    $(newPage.body).find('.publishtime').text("发布时间:");
+                };
+                
+            })
+            //草稿
+            popup.domObj.find('.saveDraft').off("click").on("click", (ev) => {
+                const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+                const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+                const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+                //const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+                const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+                //const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+                const xsscontent = editor.txt.html();
+                //防XSS攻击
+                const filterXss = new filterXSS.FilterXSS({
+                    onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                        if (name === "style") {
+                            return name + "='" + value + "'";
+                        }
+                    }
+                });
+                const content = filterXss.process(xsscontent);
+                if (prjID === "" || title === "" || creator === "" || department === "" || content === "") {
+                    this.toast.show('请完善发布信息');
+                    return;
+                }
+                const data = {
+                    "id": newsID,
+                    "prjId": prjID,
+                    "title": title,
+                    "content": content,
+                    "publishPerson": creator,
+                    "publishDept": department
+                };
+                const url = this._apiUrls.addNews;
+                this.baseAjaxSend.sendAjax(this, data, url, "POST", result => {
+                    if (result.code === 1) {
+                        this.toast.show("保存成功");
+                        newsID = result.result.id;
+                        //this.popup.close();
+                        this.searchList();
+                    } else {
+                        this.toast.show("保存失败");
+                    }
+                }, err => {
+                    this.toast.show("保存失败");
+                })
+            });
+            //发布
+            popup.domObj.find('.savePublish').off("click").on("click", (ev) => {
+                const prjID = popup.domObj.find("#" + this.prjSelID).val().toString();
+                const title = popup.domObj.find("#" + this.titleInputID).val().toString();
+                const creator = popup.domObj.find("#" + this.newsCreatorID).val().toString();
+                //const creatorID = popup.domObj.find("#" + this.newsCreatorID).data('userid');
+                const department = popup.domObj.find("#" + this.newsDepartmentID).val().toString();
+                //const departmentID = popup.domObj.find("#" + this.newsDepartmentID).data('partid');
+                const xsscontent = editor.txt.html();
+                //防XSS攻击
+                const filterXss = new filterXSS.FilterXSS({
+                    onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
+                        if (name === "style") {
+                            return name + "='" + value + "'";
+                        }
+                    }
+                });
+                const content = filterXss.process(xsscontent)
+                console.log(editor.txt.html());
+                console.log(content);
+                if (prjID === "" || title === "" || creator === "" || department === "" || content === "") {
+                    this.toast.show('请完善发布信息');
+                    return;
+                }
+                const data = {
+                    "id": newsID,
+                    "prjId": prjID,
+                    "title": title,
+                    "content": content,
+                    "publishPerson": creator,
+                    "publishDept": department
+                };
+                const url = this._apiUrls.addNews;
+                this.baseAjaxSend.sendAjax(this, data, url, "POST", result => {
+                    if (result.code === 1) {
+                        newsID = result.result.id;
+                        //发布
+                        const url = this._apiUrls.setStatus;
+                        this.baseAjaxSend.sendAjax(this, { ids: "" + newsID + "", status: "2" }, url, "POST", (result) => {
+                            if (result.code === 1) {
+                                this.toast.show("发布成功");
+                                this.popup.close();
+                                this.searchList();
+                            } else {
+                                this.toast.show("发布失败,请联系管理员");
+                            }
+                        }, err => {
+                            this.toast.show("发布失败,请联系管理员")
+                        })
+                    } else {
+                        this.toast.show("保存失败");
+                    }
+                }, err => {
+                    this.toast.show("保存失败");
+                })
+            });
+
+        }, err => {
+            console.log(err);
+        })
+    }
+    /**
+     * 该方法用于初始化日历区间插件
+     */
+    initDateRangePicker() {
+        this.domObj.find('#' + this.searchDatetimeID).daterangepicker({
+            ranges: {
+                '今天': [moment().hours(0).minutes(0).seconds(0), moment().hours(23).minutes(59).seconds(59)],
+                '近7天': [moment().subtract(6, 'days').hours(0).minutes(0).seconds(0), moment().hours(23).minutes(59).seconds(59)],
+                '本月': [moment().startOf('month').hours(0).minutes(0).seconds(0), moment().endOf('month').hours(23).minutes(59).seconds(59)],
+                '今年': [moment().startOf('year').hours(0).minutes(0).seconds(0), moment().endOf('year').hours(23).minutes(59).seconds(59)]
+            },
+            opens: "left",
+            autoUpdateInput: false,//是否自动填充日期
+            startDate: moment().hours(0).minutes(0).seconds(0), //设置开始日期
+            endDate: moment(new Date()), //设置结束器日期
+            showWeekNumbers: true,
+            timePicker: true,
+            timePicker24Hour: true,
+            timePickerSeconds: true,
+            locale: {
+                format: "YYYY-MM-DD HH:mm:ss", //设置显示格式 HH:mm:ss
+                applyLabel: '确定', //确定按钮文本
+                cancelLabel: '取消', //取消按钮文本
+                customRangeLabel: '自定义',
+                daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
+                monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
+                    '七月', '八月', '九月', '十月', '十一月', '十二月'
+                ],
+                firstDay: 1
+            }
+        },
+            function (start, end) {
+
+            }.bind(this)
+        ).on("apply.daterangepicker", function (ev, picker) {
+            const dateFormat = "YYYY-MM-DD HH:mm:ss";
+            // const dateFormat1="YYYY/MM/DD HH:mm:ss";
+            // const dateFormat2="YYYYMMDD HH:mm:ss";
+            const start = picker.startDate;
+            const end = picker.endDate;
+            this.domObj.find('#' + this.searchDatetimeID).val(picker.startDate.format(dateFormat) + ' - ' + picker.endDate.format(dateFormat));
+            //this.domObj.find('#' + this.pipespeed_dateID + ' span').html(start.format('YYYY/MM/DD') + ' - ' + end.format('YYYY/MM/DD'));
+            this.domObj.find('#' + this.searchDatetimeID).prop('title', picker.startDate.format(dateFormat) + ' - ' + picker.endDate.format(dateFormat));
+            const data2 = {
+                beginDate: start.format(dateFormat),
+                endDate: end.format(dateFormat)
+            }
+            this.domObj.find('#' + this.searchDatetimeID).data('begintime', picker.startDate.format(dateFormat));
+            this.domObj.find('#' + this.searchDatetimeID).data('endtime', picker.endDate.format(dateFormat));
+
+        }.bind(this));
+        //清除日期
+        this.domObj.find("#" + this.dateClearBtnID).off('click').on('click', e => {
+            this.domObj.find('#' + this.searchDatetimeID).val('');
+            //this.domObj.find('#' + this.pipespeed_dateID + ' span').html(start.format('YYYY/MM/DD') + ' - ' + end.format('YYYY/MM/DD'));
+            this.domObj.find('#' + this.searchDatetimeID).prop('title', '');
+            this.domObj.find('#' + this.searchDatetimeID).data('begintime', '');
+            this.domObj.find('#' + this.searchDatetimeID).data('endtime', '');
+        })
+    }
+    /**
+     * 该方法用于初始化富文本编辑器
+     */
+    initEditor(popup: any): any {
+        const editor = new wangEditor(popup.domObj.find('#richEditor')[0]);
+        //按钮标注朝下
+        editor.config.menuTooltipPosition = 'down';
+        //设置高度
+        const contentHeight = popup.conObj.find('.content-con').height();
+        editor.config.height = contentHeight;
+        //自定义图片上传
+        editor.config.uploadImgServer = this.apiRoot + this._apiUrls.uploadImg;
+        editor.config.uploadImgHeaders = {
+            Authorization: 'bearer ' + this.userToken
+        };
+        editor.config.pasteFilterStyle = false;
+        //上传回调函数
+        editor.config.uploadImgHooks = {
+            // 图片上传并返回了结果,想要自己把图片插入到编辑器中
+            // 例如服务器端返回的不是 { errno: 0, data: [...] } 这种格式,可使用 customInsert
+            customInsert: (insertImgFn, result) => {
+                // result 即服务端返回的接口
+                console.log('customInsert', result);
+
+                // insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
+                insertImgFn(this.apiRoot + this._apiUrls.viewImg + "?remotePath=" + result.result[0].path);
+            }
+        }
+        editor.create();
+        return editor;
+    }
+    /**
+     * 该方法用于获取登录用户的基本信息
+     * @param popup  弹出框
+     */
+    initUserInfo(popup: any) {
+        this.baseAjaxSend.sendAjax(this, {}, this._apiUrls.getUserInfoApi, "GET", (results) => {
+            if (results.code == 1) {
+                var data = results.result;
+                popup.domObj.find("#" + this.newsCreatorID).val(data.realName);
+                popup.domObj.find("#" + this.newsCreatorID).data('userid', data.id);
+                popup.domObj.find("#" + this.newsDepartmentID).val(data.departmentName);
+                popup.domObj.find("#" + this.newsDepartmentID).data("partid", data.departmentId);
+            } else {
+                console.log("获取用户信息失败");
+                console.error(results.message);
+            }
+        }, err => {
+            console.log("获取用户信息失败");
+        })
+    }
+    /**
+     * 该方法用于初始化用户列表,后端搜索
+     */
+    initUserList(element: any, callback: Function = null) {
+        const that = this;
+        var url = this.apiRoot + this._apiUrls.userList;
+        const userSelect = this.domObj.find(element).select2({
+            language: "zh-CN",
+            dropdownCssClass: "userManagementPopupDep",
+            allowClear: true,
+            placeholder: '---请选择---',
+            placeholderOption: "first",
+            ajax: {
+                headers: that.header,
+                delay: 250,
+                url: url,
+                dataType: "json",
+                type: "GET",
+                contentType: "application/json;charset=utf-8",
+                data: (params) => {
+                    var query = {
+                        current: params.page || 1,
+                        size: 20,
+                        realName: params.term
+                    }
+                    return query;
+                },
+                processResults: (data) => {
+                    let nodes = [];
+                    if (data.code != 1) {
+                        console.error(data.message);
+                        return { results: nodes };
+                    }
+                    data.result.records.forEach(item => {
+                        nodes.push({ id: item.id, text: item.realName });
+                    })
+                    return {
+                        results: nodes,
+                        pagination: {
+                            more: data.result.current < data.result.pages
+                        }
+                    }
+                }
+            }
+        })
+        userSelect.on('select2:clear', (ev) => {
+            userSelect.val(null).trigger('change');
+        })
+    }
+    /**
+     * 该方法用户初始化项目列表
+     * @param element select对象
+     * @param isClear 是否清空
+     * @param selectID 默认选中项
+     */
+    initProjectList(element: any, isClear: boolean, selectID: number) {
+        if (isClear) {
+            $(element).empty();
+        }
+        this.baseAjaxSend.sendAjax(this, { current: 1, size: 1000 }, this._apiUrls.projectList, 'GET', result => {
+            if (result.code === 1) {
+                result.result.records.forEach(item => {
+                    if (selectID && item.id === selectID) {
+                        $(element).append("<option value='" + item.id + "' selected>" + item.name + "</option>");
+                    } else {
+                        $(element).append("<option value='" + item.id + "'>" + item.name + "</option>");
+                    }
+                })
+                $(element).select2({
+                    placeholder: '---请选择---',
+                    placeholderOption: "first",
+                    language: "zh-CN",
+                    allowClear: true,
+                    dropdownCssClass: "userManagementPopupDep"
+
+                });
+            } else {
+                this.toast.show('获取项目列表失败');
+            }
+        }, err => {
+            this.toast.show('获取项目列表失败');
+        })
+    }
+    /**
+    * 该方法用于初始化所有PBS模板
+    * 
+    */
+    initPbsModuleList() {
+        const that = this;
+        const pbslist = [];
+        const columns = [{
+            name: 'counter', title: "序号", data: 'counter'
+        }, {
+            name: 'prjName', title: "项目", data: 'prjName'
+        }, {
+            name: 'title', title: '标题', data: 'title'
+        }, {
+            name: 'url', title: '网址', data: 'url'
+        }, {
+            name: 'qrCode', title: '二维码', data: 'qrCode'
+        }, {
+            name: 'scanTimes', title: '浏览次数', data: 'scanTimes'
+        }, {
+            name: 'status', title: '发布状态', data: 'status'
+        }, {
+            name: 'publishPerson', title: '发布人', data: 'publishPerson'
+        }, {
+            name: 'publishDept', title: '发布单位', data: 'publishDept'
+        }, {
+            name: 'createTime', title: '发布时间', data: 'createTime'
+        }, {
+            name: 'operation', title: '操作', data: 'operation'
+        }, {
+            name: "id", title: "id", data: "id", visible: false
+        }
+        ];
+        // const data = pbslist.map((item: pbsDefine, index: number) => {
+        //     return { counter: index + 1, name: item.name, isUse: parseInt(item.isUse) === 0 ? "未使用" : "使用中", id: item.id };
+        // });
+        const scrollY = this.resizeTableHeight(80);
+        const dataoptions = {
+            columns: columns,//表头
+            lengthMenu: [
+                10,
+                25,
+                50,
+                100
+            ],
+            pageLength: 25,
+            pagingType: "simple_numbers",
+            ordering: false,//排序
+            paging: true,//分页
+            info: true,//页面信息
+            searching: false,//搜索
+            scrollCollapse: false,
+            scrollY: "calc(100% - 38px)",
+            language: {
+                "lengthMenu": "每页 _MENU_ 条",
+                "zeroRecords": "未查询到任何记录",
+                "info": "共 _TOTAL_ 条",
+                "infoEmpty": "",
+                "infoFiltered": "",
+                "paginate": {
+                    "first": "首页",
+                    "last": "尾页",
+                    "next": "下一页",
+                    "previous": "上一页"
+                },
+                "search": "搜索: ",
+            },
+            dom: 't' +
+                '     <"row paging"' +
+                '           <"col-1 information"ri>' +
+                '           <"col-2 length-changing"l>' +
+                '           <"col-6 pagination"p>' +
+                '     >',
+            serverSide: true,
+            ajax: {//进行分页查询
+                headers: that.header,
+                type: "GET",
+                data: function () {
+                    const title = that.domObj.find("#" + that.searchTitleID).val().toString().trim();
+                    const project = that.domObj.find("#" + that.searchProjSelID).val();
+                    const creator = that.domObj.find("#" + that.searchCreatorID).val();
+                    const status = that.domObj.find("#" + that.searchNewsStatueID).val();
+                    const begintime = that.domObj.find("#" + that.searchDatetimeID).data('begintime');
+                    const endtime = that.domObj.find("#" + that.searchDatetimeID).data('endtime');
+                    const data = {
+                        current: 1,
+                        size: that._listTable != undefined ? that._listTable.page.info().length : 25,
+                        title: title,
+                        publishPerson: creator,
+                        prjId: project,
+                        status: status,
+                        beginTime: begintime,
+                        endTime: endtime,
+                        "orders[0].asc": false,
+                        "orders[0].column": "create_time"
+                    }
+                    if (that.baseAjaxSend.xssCodeCheck(data)) {
+                        that.toast.show('非法输入');
+                        return false;
+                    }
+                    return data;
+                },
+                url: that.apiRoot + that._apiUrls.newsList,
+                dataType: "json",
+                async: false,
+                error: function (e) {
+                    that.toast.show("获取发布信息失败");
+                    console.error(e);
+                },
+                dataSrc: function (results) {
+                    if (results.code == 1) {
+                        var value = results;
+                        results = {};
+                        //这里除了把数据处理后返回给DataTables,还需要把另外三个参数处理为顶级的属性(加入另外两个参数过会会有问题只需要recordsFiltered)
+                        value.recordsFiltered = value.result.total;
+                        results.data = [];
+                        $.each(value.result.records, function (i: number, item) {
+                            const opetions = that.setOpertations(item);
+                            const qrcodePreview = that.getQrcodeOperation(item);
+                            const hrefUrl = item.publishUrl;
+                            const publishUrl = "<a href='" + hrefUrl + "' target='_blank'>" + hrefUrl + "</a>";
+                            results.data.push({
+                                prjName: item.prjName,
+                                id: item.id,
+                                title: item.title,
+                                url: item.status === 2 ? publishUrl : "",
+                                qrCode: qrcodePreview,
+                                scanTimes: item.scanTimes,
+                                status: item.status === 1 ? "草稿" : item.status === 2 ? "已发布" : "撤销",
+                                publishPerson: item.publishPerson,
+                                publishDept: item.publishDept,
+                                createTime: item.createTime,
+                                operation: opetions,
+                                counter: i + 1
+                            })
+                        })
+                        return results.data;
+                    } else {
+                        that.toast.show(results.message);
+                        console.error(results.message);
+                    }
+                }
+            },
+            drawCallback: (setting) => {
+                $(setting.nTable).find("tbody tr").off('click').on('click', e => {
+                    //高亮行
+                    $(e.currentTarget).parents('table').find('tr').removeClass('active');
+                    $(e.currentTarget).addClass('active');
+                })
+                //编辑按钮
+                $(setting.nTable).find("tbody tr").on('click', '.operationBtn', function (e) {
+
+
+                    const tb = new $.fn.dataTable.Api(setting);
+                    const row = tb.row(e.delegateTarget).data();
+                    const operationType = $(e.currentTarget).data('type');
+                    that.initOperationsEvent(row, operationType);
+                }.bind(this));
+            },
+            initComplete: (setting) => {
+                // const tb = new $.fn.dataTable.Api(setting);
+                // const row = tb.rows();
+                // if (row.length > 0) {
+                //     $(row.$('tr')[0]).trigger('click');
+                // }//默认选择第一行数据
+            }
+        }
+        this._listTable = this.domObj.find("#" + this._tableID).DataTable(dataoptions);
+        this._listTable.on("preXhr", () => {
+            if (this._listTable) {
+                var pageinfo = this._listTable.page.info();
+                this._listTable.ajax.params().current = pageinfo.page + 1;
+                this._listTable.ajax.params().size = pageinfo.length;
+            }
+        });
+    }
+    /**
+     * 预览
+     * @param id 
+     */
+    preview(id) {
+        const url = this._apiUrls.getByID + id;
+        this.baseAjaxSend.sendAjax(this, { id: id }, url, "GET", (result) => {
+            const newpage = window.open();
+            newpage.document.write(result.result.content);
+        }, err => {
+
+        })
+    }
+    /**
+     * 该方法用于设置新闻操作配置
+     * @param info 新闻纪录
+     */
+    setOpertations(info: any) {
+        let operations = "";
+        switch (info.status) {
+            case 1:
+                operations = "<button class='btn btn-link operationBtn' data-type='edit'>编辑</button>" +
+                    "<button class='btn btn-link operationBtn' data-type='delete'>删除</button>";
+                break;
+            case 2:
+                operations = "<button class='btn btn-link operationBtn' data-type='recover'>撤销</button>";
+                break;
+            case 3:
+                operations = "<button class='btn btn-link operationBtn' data-type='edit'>编辑</button>" +
+                    "<button class='btn btn-link operationBtn' data-type='delete'>删除</button>";
+                break;
+        }
+        return operations;
+    }
+    /**
+     * 是否可浏览二维码
+     * @param info 
+     * @returns 
+     */
+    getQrcodeOperation(info: any) {
+        let operations = "";
+        switch (info.status) {
+            case 2:
+                operations = "<button class='btn btn-link operationBtn' data-type='qrcode'>查看</button>";
+                break;
+
+        }
+        return operations;
+    }
+    /**
+     * 该方法用于表格操作事件触发
+     * @param row  行数据
+     * @param operatType 事件类型
+     */
+    initOperationsEvent(row: any, operatType: string) {
+        switch (operatType) {
+            case "edit":
+                this.editNews(row.id);
+                break;
+            case "delete":
+                this.deleteNews(row.id);
+                break;
+            case "recover":
+                this.revokeNews(row.id);
+                break;
+            case "preview":
+                this.preview(row.id);
+                break;
+            case "qrcode":
+                this.viewQrcode(row.id);
+                break;
+
+        }
+    }
+    /**
+     * 查看工程信息二维码
+     * @param id 
+     */
+    viewQrcode(id) {
+        const url = this._apiUrls.qrcodeView;
+        this.baseAjaxSend.sendAjax(this, { id: id }, url, "GET", (result) => {
+            if (result.code === 1) {
+                const remotePath = result.result.fileName.viewFtpFilePath;
+                const popup = this.popup.setSizeWithoutBtns(500, 500);
+                const src = this.apiRoot + this._apiUrls.viewImg + "?remotePath=" + remotePath;
+                const content = "<div class='qrcode'><img src='" + src + "'></div>";
+                this.popup.show('二维码', content, true);
+            } else {
+                this.toast.show("后台请求失败,请联系管理员");
+            }
+        }, err => {
+            this.toast.show("后台请求失败,请联系管理员");
+        })
+    }
+    /**
+     * 该方法用于根据id删除新闻
+     * @param id 
+     */
+    deleteNews(id: number) {
+        this.popup.setSize(400, 200);
+        const popup = this.popup.show("删除", "<div style='text-align:center;'>确认是否删除工程信息?</div>");
+        popup.submitObj.off('click').on('click', (e) => {
+            const url = this._apiUrls.delNews + id;
+            this.baseAjaxSend.sendAjax(this, { id: id }, url, "DELETE", (result) => {
+                if (result.code === 1) {
+                    this.toast.show("删除成功");
+                    this.popup.close();
+                    this.searchList();
+                } else {
+                    this.toast.show('删除失败,请联系管理员');
+                }
+            }, err => {
+                this.toast.show('删除失败,请联系管理员');
+            })
+        })
+    }
+    /**
+     * 该方法用于调整表格body高度
+     * @param {number} headerAndPage 头部和分页部件高度和
+     * @returns {number} table body Y方向高度
+     */
+    resizeTableHeight(headerAndPage) {
+        const cardBodyH = this.domObj.find('.tbContainer').height();
+        return cardBodyH - headerAndPage;
+    }
+    destroy() {
+        this.afterDestroy();
+    }
+
+}
+export = ProjectNewsManagement;

+ 3 - 0
src/widgets/ProjectNewsManagement/config.json

@@ -0,0 +1,3 @@
+{
+    
+}

+ 156 - 0
src/widgets/ProjectNewsManagement/css/style.scss

@@ -0,0 +1,156 @@
+.widget-ProjectNewsManagement {
+    height: 100%;
+    .tableTools {
+        height: 42px;
+        .col-2 {
+            display: flex;
+            align-items: center;
+            label {
+                margin: 0;
+            }
+            .form-control {
+                width: 1%;
+                flex: 1 1 auto;
+            }
+        }
+        input.datapicker {
+            background: #fff;
+            color: #3a3a3a;
+            box-shadow: none;
+            padding-right: 20px !important;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+        }
+        .dateClear {
+            color: #47d9d9;
+            position: absolute;
+            right: 20px;
+            cursor: pointer;
+        }
+        .input-group {
+            .btn {
+                margin: 0;
+                padding: 0.375rem 0.75rem;
+                border-top-left-radius: 0 !important;
+                border-bottom-left-radius: 0 !important;
+            }
+        }
+    }
+    .tbContainer {
+        height: calc(100% - 42px);
+        table.table {
+            border-spacing: 0;
+            tr {
+                height: 42px;
+            }
+            // td,
+            // th {
+            //     padding: 0.2rem 0.25rem;
+            // }
+        }
+        .dataTables_wrapper {
+            height: 100%;
+            .dataTables_scroll {
+                height: calc(100% - 42px);
+            }
+        }
+        .dataTables_scrollBody {
+            tr td:last-child {
+                text-align: left;
+            }
+            .btn.btn-link {
+                background-color:unset;
+                color: #007bff;
+                font-weight: normal;
+                font-stretch: normal;
+                font-size: 14px;
+                border: none;
+                margin: 0px 3px;
+                border-radius: 0;
+                letter-spacing: 1px;
+                padding: 0;
+            }
+            .btn-link:hover,.btn-link:focus{
+                border:none !important;
+            }
+        }
+        .paging {
+            .information {
+                display: flex;
+                align-items: center;
+            }
+            .dataTables_info {
+                padding-top: 0;
+            }
+            .length-changing {
+                margin: 0;
+                .dataTables_length {
+                    display: flex;
+                    flex-flow: row nowrap;
+                    align-items: center;
+                    height: 42px;
+                    line-height: 42px;
+                    label {
+                        margin-bottom: 0;
+                    }
+                }
+            }
+            .pagination {
+                margin: 0;
+                .dataTables_paginate {
+                    margin-top: 2px;
+                }
+            }
+        }
+    }
+}
+.widget-popup {
+    .content-con {
+        .w-e-text-container {
+            overflow: hidden;
+            .w-e-text {
+                //overflow: hidden;
+            }
+        }
+        .editContainer {
+            overflow-y: auto;
+            height: calc(100% - 55px);
+        }
+        .editBtns {
+            height: 55px;
+            text-align: center;
+            margin-top: 10px;
+            .btn {
+                background-color: #3888cd;
+                color: white;
+                font-weight: normal;
+                font-stretch: normal;
+                border: 1px solid #3888cd;
+                margin: 0px 8px;
+                border-radius: 4px;
+                letter-spacing: 1px;
+            }
+            .btn:active,
+            .btn:hover,
+            .btn:focus {
+                border: 1px solid #019ffe;
+            }
+        }
+
+        .qrcode {
+            height: 100%;
+            width: 100%;
+            text-align: center;
+            img {
+                height: 98%;
+                width: 90%;
+            }
+        }
+    }
+}
+.select2-dropdown--below.userManagementPopupDep {
+    z-index: 99995;
+}
+.daterangepicker.dropdown-menu {
+    z-index: 10000;
+}

+ 6 - 0
typings/locals/appx/index.d.ts

@@ -409,6 +409,12 @@ interface WidgetPopup {
      * @param {number} height 高度
      */
     setSize(width?:number, height?:number);
+    /**
+     * 设置弹出框大小,无按钮
+     * @param width 
+     * @param height 
+     */
+    setSizeWithoutBtns(width?:number, height?:number);
     /**
      * 关闭弹出框
      */