2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Ext.define('ZYMLZiYuanModel', {
//     extend: 'Ext.data.Model',
//     fields:[ 'TITLE','DATASOURCES','CREATDATE','AROUNDRESID']
//
// });
// var resourceid=$('#resMainInfoId').val();
// var ZYMLZiYuanStore = new Ext.data.Store({
//     autoDestroy: true,
//     pageSize: 15,
//     model: 'ZYMLZiYuanModel',
//     proxy: {
//         type: 'ajax',
//         url: '/res/ResExtBusinessLayer/SelectQueryAround?resourceid='+resourceid,
//         reader: {
//             root: 'topics',
//             totalProperty: 'totalCount'
//         },
//         simpleSortMode: true
//     },
//     remoteSort: true
// });
//
// var formdata = {};
// Ext.onReady(function () {
//     Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
//     Ext.tip.QuickTipManager.init();
//     Ext.Ajax.timeout = 900000;
//     Ext.require([
//         'Ext.ux.PagingToolbar'
//     ]);
//
//     Ext.create('Ext.grid.Panel', {
//         id: 'gridexample',
//         renderTo: 'grid',
//         // width: 2400,
//         height: 800,
//         layout: 'fit',
//         autoScroll: false,
//         //bodyStyle: 'width:100%',
//         store: ZYMLZiYuanStore,
//         stateful: false,
//         stateId: 'ZYMLZiYuan-Grid',
//         viewConfig: {
//             forceFit: true,
//             enableTextSelection: true //列表数据可复制
//         },
//         columns:[
//             { xtype: 'rownumberer', text: "序号", width: '5%', align: 'center' },
//             {
//                 text: "资源名称", dataIndex: 'TITLE', width: '30%', flex: 1, sortable: true, align: 'left', filter: { type: 'string' },
//                 renderer: function (value, p, record) {
//                     var ziYuanId = record.getData()["AROUNDRESID"];
//                     return Ext.String.format(
//                         '<span style="text-decoration : underline;cursor:pointer;" title="{1}" onclick="OpenZiYuan(\'{0}\')" >{1}</span>',
//                         ziYuanId, value
//                     );
//                 }
//             },
//             { text: "数据来源", dataIndex: 'DATASOURCES', width: '25%', sortable: true, filter: { type: 'string' }, align: 'center' },
//             { text: "创建时间", dataIndex: 'CREATDATE', width: '25%', sortable: true, filter: { type: 'string' }, align: 'center' },{
//                 text: "操作", dataIndex: 'AROUNDRESID', id: 'AROUNDRESID', width: '10%', sortable: true, align: 'center', filter: { type: 'string' },
//                 renderer: function (value, p, record) {
//                     return Ext.String.format(
//                         '<button class="btn btn-primary" id="btnTG" data-toggle="modal" href="#myModal" data-keyboard="false" data-backdrop="true" onclick="delZiYuanGuanLian({0});">删除</button>',
//                         value
//                     );
//                 }
//             }
//         ] ,
//         bbar: Ext.create('Ext.ux.PagingToolbar', {
//             id: "Page",
//             name: "Page",
//             store: ZYMLZiYuanStore,
//             displayInfo: true,
//             firstText: "首页",
//             prevText: "上一页",
//             nextText: "下一页",
//             lastText: "尾页",
//             refreshText: '刷新',
//             beforePageText: '第',
//             afterPageText: '页,共 {0} 页',
//             displayMsg: '显示 {0} - {1} 条,共 {2} 条',
//             emptyMsg: "没有数据显示",
//             items: [
//                 {
//                     xtype: 'label',
//                     text: ''
//                 }
//             ]
//         })
//     });
//
//     ZYMLZiYuanStore.on('beforeload', function () {
//         // GetSearchWhere("SearchForm");
//         ZYMLZiYuanStore.proxy.extraParams = [];
//         Ext.apply(ZYMLZiYuanStore.proxy.extraParams, formdata);
//     });
//     ZYMLZiYuanStore.on('load', function (store, records, successful, eOpts) {
//         // var totalCount = store.totalCount;
//         // if (totalCount == "") totalCount = "0";
//     });
//     ZYMLZiYuanStore.load();
//
//     //添加resize监听防止切换tab或者收起左栏导致grid不自适应宽度
//     $(window).resize(function () {
//         Ext.getCmp('gridexample').doLayout();//panel重新布局
//     });
// });
//
// //查询事件
// function Search() {
//     Ext.getCmp('gridexample').dockedItems.items[1].store.currentPage = 1;
//     ZYMLZiYuanStore.load();
// }
//
// //添加资源按钮
// function addMainInfo() {
//     layer.open({
//         type: 2,
//         title: '添加资源',
//         id: 'ZiYuanKZ',
//         shadeClose: true,
//         shade: 0.7,
//         maxmin: false, //开启最大化最小化按钮
//         area: ['800px', '600px'],
//         content: '../../common/resource_select?flag=zbcx&resourceid=' + resourceid
//     });
// }
//
// function delZiYuanGuanLian(objectid) {
//     if (confirm("确定删除吗?")) {
//         $.ajax({
//             url: '/res/ResManage/ResRegister/ZiYuanZhouBianGuanLianDelete?aroundresid='+objectid,
//             type: 'get',
//             dataType: 'text',
//             success: function (data) {
//                 if (data == "1") {
//                     alert('删除成功');
//                     parent.location.reload(); // 父页面刷新
//                 }
//                 else {
//                     alert('删除失败');
//                 }
//             }
//         })
//     }
// }
// //打开查看资源信息窗口
// function OpenZiYuan(id) {
//     var url = "/res/ZiYuan/ZiYuanBaseInfo?resourceid=" + id;
//     window.open(url, '_blank', 'location=yes,scrollbars=yes,status=yes');
// }