| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <html>
- <head>
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <title>提示</title>
- </head>
- <body>
- <div id="space-content">
- <div class="result">
- <i :class="${code }"></i>
- <p class="result-msg">
- ${msg }
- </p>
- <div style="text-align: center; margin-top: 66px;">
- 将在<span style="color:red;">{{seconds}}</span>秒后自动切换下一个审核
- </div>
- <div style="text-align: center; margin-top: 86px;">
- <el-button type="primary" @click="refreshParentWin()">立即切换</el-button>
- <el-button @click="closeThis()">关闭</el-button>
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- space.vue = new Vue({
- el: space.appContent,
- data() {
- return {
- success: "spaceicon icon-success",
- error: "spaceicon icon-error",
- warning: "spaceicon icon-warning",
- info: "spaceicon icon-info",
- question: "spaceicon icon-question",
- seconds: 3,
- winInterval: undefined
- }
- },
- mounted: function() {
- try {
- var _this = this;
- if (!this.isBatchAuditMode()) {
- window.setTimeout(function() {
- _this.closeThis();
- }, 120);
- return;
- }
- this.winInterval = setInterval(function() {
- if (_this.seconds == 0) {
- _this.refreshParentWin();
- return;
- }
- _this.seconds--;
- }, 1000);
- } catch(e) {
- }
- },
- methods: {
- hasRefreshBacklog: function(win) {
- return win && win != window
- && win.space
- && win.space.vue
- && typeof win.space.vue.refreshBacklog == "function";
- },
- isBatchAuditMode: function() {
- return this.hasRefreshBacklog(window.parent)
- && window.parent.space.vue
- && typeof window.parent.space.vue.openAudit == "function"
- && window.parent.space.vue.windowSRC != undefined;
- },
- getLayerParentWin: function() {
- try {
- var index = space.topWin.layer.getFrameIndex(window.name);
- if (space.utils.isNull(index)) {
- return window.parentWin;
- }
- var layerMap = space.topWin.spaceIndex.vars.layerMaps[index];
- if (layerMap && layerMap.parentWin) {
- return layerMap.parentWin;
- }
- } catch (e) {
- }
- return window.parentWin;
- },
- closeCurrentLayer: function() {
- try {
- var parentWin = this.getLayerParentWin();
- if (parentWin && parentWin.space) {
- parentWin.space.vars.refreshFlag = true;
- }
- } catch (e) {
- }
- try {
- var index = space.topWin.layer.getFrameIndex(window.name);
- if (!space.utils.isNull(index)) {
- space.topWin.layer.close(index);
- return true;
- }
- } catch (e) {
- }
- try {
- var index2 = space.allFunction.getParentLayerIndex(window);
- if (!space.utils.isNull(index2)) {
- space.topWin.layer.close(index2);
- return true;
- }
- } catch (e) {
- }
- return false;
- },
- /**
- * 关闭提示
- */
- closeThis: function() {
- var msg = '${msg}';
- var code = "${code}";
-
- try {
- if(code == "success") {
- space.topWin.spaceIndex.info.success(msg);
- } else if(code == "error") {
- space.topWin.spaceIndex.info.error(msg);
- } else if(code == "warning") {
- space.topWin.spaceIndex.info.warning(msg);
- } else if(space.utils.isNull(code)) {
- space.topWin.spaceIndex.info.info(msg);
- }
- } catch (e) {
- }
- if (this.closeCurrentLayer()) {
- return;
- }
- try {
- space.allFunction.closeDialog(true, '${layerIndex }');
- } catch (e) {
- }
- },
- /**
- * 刷新父窗口
- */
- refreshParentWin: function() {
- window.clearInterval(this.winInterval);
- if (!this.isBatchAuditMode()) {
- this.closeThis();
- return;
- }
- window.parent.space.vue.refreshBacklog();
- }
- }
- })
- </script>
- </html>
|