浏览代码

教育培训需求变更 代码提交

jingyuanchao 2 年之前
父节点
当前提交
e4ca2deb91
共有 3 个文件被更改,包括 28 次插入14 次删除
  1. 3 3
      src/components/K-FileUpload/index.vue
  2. 23 11
      src/views/core/edu/plan/index.vue
  3. 2 0
      src/views/core/edu/task/index.vue

+ 3 - 3
src/components/K-FileUpload/index.vue

@@ -151,7 +151,7 @@ export default {
   methods: {
 
     getAcceptByFileType()
-    {      
+    {
       if(this.fileType)
       {
         let arr= this.fileType.map(x=> "."+x);
@@ -250,14 +250,14 @@ export default {
       formData.append('file', fileObj.file);
       console.log("this.fileValueList.length",this.fileValueList.length)
       if (this.fileValueList.length<=this.limit){
-        upload(formData, 'image').then(res => {
+        upload(formData).then(res => {
           /*上传成功*/
           this.$modal.closeLoading();
           //let imgUrl = process.env.VUE_APP_BASE_API + res.data.url;
           let arr = [];
           arr.push({ name: res.data.realName, url: res.data.url });
           this.fileValueList = this.fileValueList.concat(arr);
-          // console.log("uploadFile", this.fileList)
+          this.$modal.msgSuccess("上传成功!");
           fileObj.onSuccess();
         }).catch(err => {
           /*上传失败*/

+ 23 - 11
src/views/core/edu/plan/index.vue

@@ -13,6 +13,7 @@
 
           <el-form-item label="培训主题" prop="planName">
             <el-input v-model="queryParams.planName" placeholder="请输入培训主题" clearable
+                      maxlength="50" show-word-limit
                       @keyup.enter.native="handleQuery"/>
           </el-form-item>
           <el-form-item label="培训机构类型" prop="execOrgType">
@@ -145,7 +146,7 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="培训主题" prop="planName">
+            <el-form-item label="培训主题" prop="planName" class="endItem" >
               <el-input v-model="form.planName" maxlength="50" show-word-limit placeholder="请输入培训主题"/>
             </el-form-item>
           </el-col>
@@ -230,7 +231,7 @@
           <el-col :span="12">
             <el-form-item v-show="form.execOrgType" label="培训机构" prop="planExecOrgIdList">
               <org-tree-select v-model="form.planExecOrgIdList" :queryData="form.execOrgType"
-                ref="orgTreeSelect" :enabledCheckOrgTypes="form.execOrgType" :disable="true">
+                               ref="orgTreeSelect" :enabledCheckOrgTypes="form.execOrgType" :disable="true">
               </org-tree-select>
             </el-form-item>
           </el-col>
@@ -454,7 +455,7 @@ export default {
     },
     checkCanDel(row) {
       // 计划所属机构or创建机构 =当前登陆人机构  && 创建机构为省联社  && 不是被下发的  && 计划下不存在已有执行任务的情况
-      return (row.belongOrgId == this.$store.getters.orgId || row.createOrgId == this.$store.getters.orgId)
+      return (row.createOrgId == this.$store.getters.orgId)
         && (row.issue != 1 || (row.issue == 1 && row.done != 1))
     },
     //省联社下发的计划不显示“删除”按钮
@@ -583,7 +584,7 @@ export default {
           }
           if (request.id != null) {
             console.log("updatePlan", request)
-            this.$modal.confirm(this.getMsgStr(request,'修改')).then(function () {
+            this.$modal.confirm(this.getMsgStr(request, '修改')).then(function () {
               return updatePlan(request);
             }).then(() => {
               this.$modal.msgSuccess("修改成功");
@@ -605,7 +606,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm(this.getMsgStr(row,'删除')).then(function () {
+      this.$modal.confirm(this.getMsgStr(row, '删除')).then(function () {
         return delPlan(ids);
       }).then(() => {
         this.getList();
@@ -616,7 +617,7 @@ export default {
     /** 下发计划 */
     handlePublish(row) {
       if (row.id != null) {
-        this.$modal.confirm(this.getMsgStr(row,'下发')).then(function () {
+        this.$modal.confirm(this.getMsgStr(row, '下发')).then(function () {
           return publishPlan(row.id);
         }).then(() => {
           this.$modal.msgSuccess("计划下发成功");
@@ -625,17 +626,17 @@ export default {
         });
       }
     },
-    getMsgStr(row,type){
-      let str='是否确认'+type+'该计划?';
-      if (row.standard==1){
-        str='此操作将会影响所有行社计划,'+str;
+    getMsgStr(row, type) {
+      let str = '是否确认' + type + '该计划?';
+      if (row.standard == 1) {
+        str = '此操作将会影响所有行社计划,' + str;
       }
       return str;
     },
     //撤回计划
     handleRevocation(row) {
       if (row.id != null) {
-        this.$modal.confirm(this.getMsgStr(row,'撤回')).then(function () {
+        this.$modal.confirm(this.getMsgStr(row, '撤回')).then(function () {
           return revocationPlan(row.id);
         }).then(() => {
           this.$modal.msgSuccess("计划撤回成功");
@@ -676,5 +677,16 @@ export default {
   // updated(){
   //   console.log("update",this.$options.dicts);
   // },
+
 };
+
 </script>
+
+
+<style lang="scss" scoped>
+.endItem ::v-deep .el-textarea__inner {
+  padding-bottom: 36px;
+}
+</style>
+
+

+ 2 - 0
src/views/core/edu/task/index.vue

@@ -13,6 +13,8 @@
           v-model="queryParams.title"
           placeholder="请输入培训主题"
           clearable
+          maxlength="50"
+          show-word-limit
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>