Browse Source

优化学校配置

WANG 5 years ago
parent
commit
1571bbd75d
1 changed files with 2 additions and 179 deletions
  1. 2 179
      src/modules/basic/view/school.vue

+ 2 - 179
src/modules/basic/view/school.vue

@@ -137,16 +137,6 @@
               />
               />
             </el-form-item>
             </el-form-item>
           </el-row>
           </el-row>
-          <el-row>
-            <el-form-item label="考生端产品名" label-width="120px">
-              <el-input
-                class="pull_length"
-                v-model="schoolForm.properties.OE_STUDENT_SYS_NAME"
-                auto-complete="off"
-                placeholder="考生端产品名"
-              />
-            </el-form-item>
-          </el-row>
           <el-row>
           <el-row>
             <el-form-item label="状态" label-width="120px" prop="enable">
             <el-form-item label="状态" label-width="120px" prop="enable">
               <el-radio-group class="pull_right_sm" v-model="schoolForm.enable">
               <el-radio-group class="pull_right_sm" v-model="schoolForm.enable">
@@ -162,56 +152,6 @@
         </el-form>
         </el-form>
       </el-dialog>
       </el-dialog>
 
 
-      <!-- 学校产品分配弹出框 -->
-      <el-dialog title="产品分配" :visible.sync="functionDialog">
-        <div>
-          <el-button type="primary" @click="saveOrgFunction">保 存</el-button>
-          <el-button @click="functionDialog = false">取 消</el-button>
-        </div>
-      </el-dialog>
-
-      <!-- logo上传弹窗 -->
-      <el-dialog title="logo上传" width="350px" :visible.sync="logoDialog">
-        <el-form inline>
-          <el-row>
-            <el-form-item label="学校名称">
-              <el-input class="pull_length" v-model="curSchool.name" disabled />
-            </el-form-item>
-            <el-form-item label="学校代码">
-              <el-input class="pull_length" v-model="curSchool.code" disabled />
-            </el-form-item>
-            <el-form-item>
-              <el-upload
-                class="form_left"
-                ref="upload"
-                accept="image/*"
-                :action="uploadAction"
-                :headers="uploadHeaders"
-                :data="uploadData"
-                :before-upload="beforeUpload"
-                :on-progress="uploadProgress"
-                :on-success="uploadSuccess"
-                :on-error="uploadError"
-                :file-list="fileList"
-                :auto-upload="false"
-                :multiple="false"
-              >
-                <el-button size="small" slot="trigger" type="primary"
-                  >选择文件</el-button
-                >&nbsp;
-                <el-button size="small" type="success" @click="submitUpload"
-                  >确认上传</el-button
-                >
-                <el-button size="small" type="danger" @click="removeFile"
-                  >清空文件</el-button
-                >
-                <div slot="tip" class="el-upload__tip">只能上传图片</div>
-              </el-upload>
-            </el-form-item>
-          </el-row>
-        </el-form>
-      </el-dialog>
-
       <!-- 页面列表 -->
       <!-- 页面列表 -->
       <el-table
       <el-table
         :data="tableData"
         :data="tableData"
@@ -300,15 +240,6 @@
             >
             >
               <i class="el-icon-edit"></i> 编辑
               <i class="el-icon-edit"></i> 编辑
             </el-button>
             </el-button>
-            <el-button
-              v-show="false"
-              size="mini"
-              type="primary"
-              plain
-              @click="setLogo(scope.row)"
-              icon="el-icon-upload"
-              >logo上传</el-button
-            >
           </div>
           </div>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
@@ -348,13 +279,8 @@ export default {
         contacts: "",
         contacts: "",
         telephone: "",
         telephone: "",
         enable: "true",
         enable: "true",
-        remark: "",
-        properties: {
-          OE_STUDENT_SYS_NAME: null
-        }
+        remark: ""
       },
       },
-      functionDialog: false,
-      functionDialogInited: false,
       schoolDialog: false,
       schoolDialog: false,
       logoDialog: false,
       logoDialog: false,
       curSchool: {
       curSchool: {
@@ -563,7 +489,6 @@ export default {
       this.schoolForm.domainName = "";
       this.schoolForm.domainName = "";
       this.schoolForm.telephone = "";
       this.schoolForm.telephone = "";
       this.schoolForm.contacts = "";
       this.schoolForm.contacts = "";
-      this.schoolForm.properties.OE_STUDENT_SYS_NAME = "";
       this.schoolForm.enable = "true";
       this.schoolForm.enable = "true";
 
 
       this.schoolDialog = true;
       this.schoolDialog = true;
@@ -576,111 +501,9 @@ export default {
       this.schoolForm.domainName = row.domainName;
       this.schoolForm.domainName = row.domainName;
       this.schoolForm.telephone = row.telephone;
       this.schoolForm.telephone = row.telephone;
       this.schoolForm.contacts = row.contacts;
       this.schoolForm.contacts = row.contacts;
-      this.schoolForm.properties.OE_STUDENT_SYS_NAME = "";
       this.schoolForm.enable = row.enable ? "true" : "false";
       this.schoolForm.enable = row.enable ? "true" : "false";
 
 
-      var url = CORE_API + "/org/allProperties/" + row.id;
-      this.$httpWithMsg.get(url).then(response => {
-        this.schoolForm.properties = Object.assign(
-          this.schoolForm.properties,
-          response.data
-        );
-        this.schoolDialog = true;
-      });
-    },
-    //设置产品
-    saveOrgFunction() {},
-    //设置logo
-    setLogo(row) {
-      this.uploadAction = CORE_API + "/org/importLogo/" + row.id;
-      this.removeFile();
-      this.curSchool.name = row.name;
-      this.curSchool.code = row.code;
-      this.logoDialog = true;
-    },
-    initUpload() {
-      this.fileList = [];
-    },
-    beforeUpload(file) {
-      console.log(file);
-    },
-    uploadProgress() {
-      console.log("uploadProgress");
-    },
-    uploadSuccess(response) {
-      console.log("uploadSuccess");
-      console.log(response);
-      if (!response || response.length == 0) {
-        this.$notify({
-          message: "上传成功",
-          type: "success"
-        });
-      } else {
-        this.errMessages = response;
-        this.errDialog = true;
-      }
-      this.fileLoading = false;
-      this.logoDialog = false;
-      this.removeFile();
-      this.searchForm();
-    },
-    uploadError(response) {
-      let json = JSON.parse(response.message);
-      if (response.status == 500) {
-        this.$notify({
-          message: json.desc,
-          type: "error"
-        });
-      }
-      this.fileLoading = false;
-    },
-    //确定上传
-    submitUpload() {
-      if (!this.checkUpload()) {
-        return false;
-      }
-      this.$refs.upload.submit();
-      this.fileLoading = true;
-    },
-    checkUpload() {
-      var fileList = this.$refs.upload.uploadFiles;
-      if (fileList.length == 0) {
-        this.$notify({
-          message: "上传文件不能为空",
-          type: "error"
-        });
-        return false;
-      }
-      if (fileList.length > 1) {
-        this.$notify({
-          message: "每次只能上传一个文件",
-          type: "error"
-        });
-        return false;
-      }
-      for (let file of fileList) {
-        var fileName = file.name;
-        if (
-          !fileName.endsWith(".jpg") &&
-          !fileName.endsWith(".gif") &&
-          !fileName.endsWith(".png")
-        ) {
-          this.$notify({
-            message: "上传文件必须为[jpg,gif,png]",
-            type: "error"
-          });
-          this.initUpload();
-          return false;
-        }
-      }
-      return true;
-    },
-    //清空文件
-    removeFile() {
-      this.fileList = [];
-      if (this.$refs.upload) {
-        this.$refs.upload.clearFiles();
-      }
+      this.schoolDialog = true;
     }
     }
   },
   },
   //初始化查询
   //初始化查询