fan il y a 2 ans
Parent
commit
7959db8a10

+ 3 - 58
public/static/views/incomeTemplateExcel.html

@@ -135,17 +135,12 @@
                     isAdmin = res.body.isExcelAdmin;
                     emptyExcel = res.body.emptyExcel;
                     console.log(type);
-                    if (type == '2') {
-                        if (isAdmin) {
-                            toolBar += '<input id="imports" type="file" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;"></input>';
-                        }
-                    }
                     if (isAdmin) {
+                        toolBar += '<input id="imports" type="file" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;"></input>';
                         toolBar += '<button id="exports" class="btn btn-primary btn-danger" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">导出</button>';
                     }
                     toolBar += '<button id="saves" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>';
-                    toolBar += '<button id="closeExcel" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">返回</button>' +
-                        '<button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">全屏显示</button>' +
+                    toolBar += '<button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">全屏显示</button>' +
                         '<button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;display:none">退出全屏</button>';
                     var eJson = res.body.excelJson;
                     var cellData = luckysheet.transToCellData(eJson[0].data);
@@ -300,9 +295,6 @@
 
         // 绑定按钮事件
         function initHandel() {
-            $("#closeExcel").on("click", function () {
-                window.parent['backToExcelList']('true');
-            })
             $("#fullScreen").on("click", function () {
                 fullScreen();
             })
@@ -312,54 +304,7 @@
             })
             //分享
             $('#share').off("click").click(function () {
-                //  当前工作表名
-                var excelId = $(window.parent.document).find("#excelId").attr("value");
-                var sheetName = luckysheet.getSheet().name;
-                var excelData = luckysheet.getSheet(sheetName);
-                var urlsave = '/market/cOnlineExcel/saveExcel';
-                var editFrom = $("#editFrom").val();
-                var editTo = $("#editTo").val();
-                var editStatus = $("#editStatus").val();
-                var excelName = luckysheet.toJson().title;
-                //校验可编辑列
-                if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
-
-                } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
-                    if (editFrom == 0) {
-                        window.top.$vm.$message({
-                            message: '可编辑列开始不能为0',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                    if (editFrom > editTo) {
-                        window.top.$vm.$message({
-                            message: '可编辑列的起始列不能大于结束列',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
-
-                } else {
-                    window.top.$vm.$message({
-                        message: '可编辑列必须全部为字母或数字',
-                        type: 'info'
-                    })
-                    return;
-                }
-                util.ajaxJson("正在加载中", ctx + '/market/cOnlineExcel/checkExcelEmpty', {
-                    data: excelData,
-                }, function (data) {
-                    if (data.result == 1) {
-                        window.top.$vm.$message({
-                            message: data.desc,
-                            type: 'error'
-                        });
-                    } else {
-                        window.parent['shareExcel'](excelData, editFrom, editTo, editStatus, excelName,excelId);
-                    }
-                });
+                window.parent['showAuthDialog']('true');
             });
             // 保存
             $('#saves').off("click").click(function () {

+ 69 - 0
src/pages/main/incomeExcel/incomeExcelInfo.vue

@@ -1,8 +1,73 @@
 <template>
     <div class="container" id="container">
         <iframe height="100%" width="100%" src="/static/views/incomeTemplateExcel.html" frameborder="0"></iframe>
+        <el-dialog :title="'权限设置'" :visible.sync="authSettingStatus" width="50%" :destroy-on-close="true"
+                   :modal-append-to-body="false" :close-on-click-modal="false">
+            <el-form :model="testModel" ref="addInfoList">
+                <div>
+                    <div class="info-line">
+                        <el-radio v-model="authType" label="1" style="margin: 10px">无特殊权限</el-radio>
+                        <div id="noLimit" class="info-line">
+                            <span style="margin-right: 20px;margin-left: 40px">负责人:</span>
+                            <el-button type="primary">组织机构</el-button>
+                            <span style="width: 80px;margin-right: 20px;margin-left: 20px">{{text}}</span>
+                        </div>
+                    </div>
+                    <div class="info-line">
+                        <el-radio v-model="authType" label="2" style="margin: 10px">特殊权限</el-radio>
+                        <div id="limit">
+                            <span style="margin-right: 20px;margin-left: 40px">负责人:</span>
+                            <el-button type="primary">组织机构</el-button>
+                            <span style="margin-right: 20px;margin-left: 20px">{{text}}</span>
+                            <span style="margin-right: 10px;margin-left: 10px">可编辑行:从</span>
+                            <el-input v-model="testModel.a" style="width: 60px;"></el-input>
+                            <span style="margin-right: 10px;margin-left: 10px">到</span>
+                            <el-input v-model="testModel.b" style="width: 60px;"></el-input>
+                            <br/><br/>
+                            <el-button style="width: 80px;margin-right: 20px;margin-left: 40px">添加</el-button>
+                        </div>
+                    </div>
+                    <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
+                        <el-button>取 消</el-button>
+                        <el-button type="primary">确 定</el-button>
+                    </div>
+                </div>
+            </el-form>
+        </el-dialog>
     </div>
 </template>
+<script>
+import myMessage from "../../../components/myMessage.vue"
+
+export default {
+    components: {
+        myMessage
+    },
+    data() {
+
+        return {
+            testModel: {},
+            authSettingStatus: false,
+            authType: '1',
+            text:'负责人A 负责人B 负责人C'
+
+        }
+    },
+    methods: {
+        showAuthDialog() {
+            this.authSettingStatus = true;
+        }
+    },
+    mounted() {
+
+    },
+    created() {
+        window['showAuthDialog'] = (rp) => {
+            this.showAuthDialog(rp);
+        }
+    }
+}
+</script>
 <style scoped>
 .containerr {
     background: #fff;
@@ -13,4 +78,8 @@
     top: 0;
     overflow: hidden;
 }
+
+span {
+    width: 80px;
+}
 </style>