123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml" ng-app="app">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <title>规范性文件台账详情</title>
- <link href="../../../AFrontEnd/css/animate.css" rel="stylesheet" />
- <link href="../../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
- <link href="../../../AFrontEnd/css/bootstrap.css" rel="stylesheet" />
- <link href="../../../AFrontEnd/css/style.css" rel="stylesheet" />
- <script>document.write("<link href='../../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
- </head>
- <body>
- <div ng-controller="detailCtrl as ctl" ng-cloak>
- <iframe id="iframe" ng-style="ctl.iframeStyle" src=""></iframe>
- <table class="sp-table" ng-if="ctl.list.length>0">
- <thead>
- <tr>
- <th>关联文号</th>
- <th>文件名称</th>
- <th>文件施行日期</th>
- <th>文件到期日期</th>
- <th>责任处室</th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="item in ctl.list">
- <td ng-bind="item.WH"></td>
- <td><a ng-bind="item.WJBT" ng-click="ctl.goUrl(item)"></a></td>
- <td ng-bind="item.WJSXRQ"></td>
- <td ng-bind="item.WJDQRQ"></td>
- <td ng-bind="item.ZRCS"></td>
- </tr>
- </tbody>
- </table>
- </div>
- <script src="../../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
- <script src="../../../AFrontEnd/js/laydate/laydate.js"></script>
- <script src="../../../AFrontEnd/js/angularjs/angular.js"></script>
- <script src="../../../AFrontEnd/js/angularjs/dirPagination.js"></script>
- <script src="../../../apiurljs.js"></script>
- <script src="../../../js/sm4.js"></script>
- <script>document.write('<scri' + 'pt src="../../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
- <script>
- 'use strict';
- var app = angular.module('app', [
- 'angularUtils.directives.dirPagination'
- ]);
- app.controller("detailCtrl", ["$scope", "$http", "$timeout", "$interval", function ($scope, $http, $timeout, $interval) {
- var self = this;
- var s4 = new SM4Util();
- self.userId = $.cookie("GlWorkPlatform-userid");
- self.userName = $.cookie("GlWorkPlatform-chineseName");
- self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
- var postCfg = {
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': "Bearer " + self.get_AccessToken
- }
- }
- self.goUrl = function (obj) {
- sp.openNewWindow("detail.html?id=" + obj.ID, obj.WJBT)
- }
- self.getDetail = function () {
- var data = {
- tablename: "FW_GFXWJTZ",
- colums: "*",
- order: "SORTID",
- sqlwhere: { ID: sp.getUrlName("id") },
- sqlinwhere: "",
- sqllikewhere: ""
- }
- $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.iframeStyle = {
- "width": "100%",
- "height": res.data[0].GLWH == "" || res.data[0].GLWH == null ? $(window).height() - 10 : "750px",
- "border": "none"
- }
- self.getList(res.data[0].GLWH)
- var FILEEXT = res.data[0].WJDZ.slice(res.data[0].WJDZ.lastIndexOf(".") + 1);
- var set_convertType = 0;
- if (FILEEXT == "doc") {
- set_convertType = 0;
- } else if (FILEEXT == "pdf") {
- set_convertType = 20;
- } else if (FILEEXT == "ofd") {
- set_convertType = 570;
- } else {
- set_convertType = 0;
- }
- let postData = {
- convertType: set_convertType,
- isSignature: 1,
- isDownload: 1,
- isPrint: 1,
- fileUrl: res.data[0].WJDZ
- };
- var postCfg_transfer = {
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- transformRequest: function (data) {
- return $.param(data);
- }
- };
- $http.post(apiurljs.login.split("glwork/")[0] + "fcscloud/composite/httpfile", postData, postCfg_transfer)
- .success(function (res1) {
- if (res1.errorcode === 0) {
- $("#iframe").attr("src", res1.data.viewUrl)
- }
- });
- })
- }
- self.getDetail()
- self.getList = function (WH) {
- var data = {
- tablename: "FW_GFXWJTZ",
- colums: "*",
- order: "SORTID",
- sqlwhere: { WH: WH },
- sqlinwhere: "",
- sqllikewhere: ""
- }
- $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.list = res.data;
- })
- }
- }])
- </script>
- <script src="../../../AFrontEnd/js/special/spng.js"></script>
- <script src="../../../AFrontEnd/js/special/spngvld.js"></script>
- </body>
- </html>
|