Browse Source

Merge branch 'master' of http://git.cc-lotus.info/financial_platform/admin-cms

reloaded 5 years ago
parent
commit
bbc80c5fbc

+ 18 - 2
src/layout/digitalService/digitalServiceForm.vue

@@ -64,7 +64,7 @@
       rules: {
         title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
         service: [{ required: true, message: '请输入服务', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
         contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
         phone: [{ required: true, message: '请输入联系电话'},
                 { min: 11, max: 11, message: '请输入11位联系电话', trigger: 'blur' },
@@ -76,7 +76,23 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        if(!this.ruleForm.description){
+          this.$message.error('请输入机构介绍');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/digitalService/digitalServiceList.vue

@@ -105,8 +105,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit,type:this.type, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 18 - 2
src/layout/financialService/financialServiceForm.vue

@@ -64,7 +64,7 @@
       rules: {
         title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
         service: [{ required: true, message: '请输入服务', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
         contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
         phone: [{ required: true, message: '请输入联系电话'},
                 { min: 11, max: 11, message: '请输入11位联系电话', trigger: 'blur' },
@@ -76,7 +76,23 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        if(!this.ruleForm.description){
+          this.$message.error('请输入机构介绍');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/financialService/financialServiceList.vue

@@ -105,8 +105,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit,type:this.type, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 1 - 1
src/layout/layout-part/menus.vue

@@ -65,7 +65,7 @@
           <span>政策服务管理</span>
         </template>
         <el-menu-item-group>
-          <el-menu-item index="/tInformationDelivery/index">政策发布管理</el-menu-item>
+          <!--<el-menu-item index="/tInformationDelivery/index">政策发布管理</el-menu-item>-->
           <el-menu-item index="/tPolicyInterpretation/index">政策解读管理</el-menu-item>
           <el-menu-item index="/tDeclarationApproval/index">政策申报历史记录</el-menu-item>
         </el-menu-item-group>

+ 18 - 2
src/layout/legalService/legalServiceForm.vue

@@ -64,7 +64,7 @@
       rules: {
         title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
         service: [{ required: true, message: '请输入服务', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
         contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
         phone: [{ required: true, message: '请输入联系电话'},
                 { min: 11, max: 11, message: '请输入11位联系电话', trigger: 'blur' },
@@ -76,7 +76,23 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        if(!this.ruleForm.description){
+          this.$message.error('请输入机构介绍');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/legalService/legalServiceList.vue

@@ -105,8 +105,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit,type:this.type, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 18 - 2
src/layout/marketService/marketServiceForm.vue

@@ -64,7 +64,7 @@
       rules: {
         title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
         service: [{ required: true, message: '请输入服务', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
         contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
         phone: [{ required: true, message: '请输入联系电话'},
                 { min: 11, max: 11, message: '请输入11位联系电话', trigger: 'blur' },
@@ -76,7 +76,23 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        if(!this.ruleForm.description){
+          this.$message.error('请输入机构介绍');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/marketService/marketServiceList.vue

@@ -105,8 +105,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit,type:this.type, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 14 - 2
src/layout/news/newsForm.vue

@@ -78,7 +78,7 @@
       formTitle: '新闻中心管理',
       rules: {
         title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
-        hot: [{ required: true }],
+        hot: [{ required: true, message: '请选择是否热门', trigger: 'change'  }],
         description: [{ required: true, message: '请输入内容', trigger: 'blur' }],
       },
     }),
@@ -86,7 +86,19 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.description){
+          this.$message.error('请输入内容');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/news/newsList.vue

@@ -123,8 +123,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 15 - 3
src/layout/specialist/zhuanjiaForm.vue

@@ -68,9 +68,9 @@
       formTitle: '融资专家管理',
       rules: {
         name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
-        gender: [{ required: true }],
+        gender: [{ required: true , message: '请选择性别', trigger: 'change'}],
         work_history: [{ required: true, message: '请输入从事财政/金融类工作经历', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传头像', trigger: 'blur'}],
         result: [{ required: true, message: '请输入曾获荣誉或融资成果', trigger: 'blur' }],
       },
     }),
@@ -78,7 +78,19 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传头像');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/specialist/zhuanjiaList.vue

@@ -104,8 +104,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 15 - 3
src/layout/tInformationDelivery/tInformationDeliveryForm.vue

@@ -70,8 +70,8 @@
       rules: {
         title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
         issuing_organ: [{ required: true, message: '请输入发文机关', trigger: 'blur' }],
-        subject_classification: [{ required: true }],
-        subject_headings: [{ required: true }],
+        subject_classification: [{ required: true, message: '请选择政策等级', trigger: 'change' }],
+        subject_headings: [{ required: true, message: '请选择主题词', trigger: 'change' }],
         description: [{ required: true, message: '请输入内容', trigger: 'blur' }],
       },
     }),
@@ -79,7 +79,19 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.description){
+          this.$message.error('请输入内容');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/tInformationDelivery/tInformationDeliveryList.vue

@@ -111,8 +111,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 15 - 3
src/layout/tPolicyInterpretation/tPolicyInterpretationForm.vue

@@ -67,8 +67,8 @@
       rules: {
         title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
         issuing_organ: [{ required: true, message: '请输入发文机关', trigger: 'blur' }],
-        subject_classification: [{ required: true }],
-        subject_headings: [{ required: true }],
+        subject_classification: [{ required: true, message: '请选择政策等级', trigger: 'change' }],
+        subject_headings: [{ required: true, message: '请选择主题词', trigger: 'change' }],
         description: [{ required: true, message: '请输入内容', trigger: 'blur' }],
       },
     }),
@@ -76,7 +76,19 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.description){
+          this.$message.error('请输入内容');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/tPolicyInterpretation/tPolicyInterpretationList.vue

@@ -110,8 +110,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 18 - 2
src/layout/technicalService/technicalServiceForm.vue

@@ -64,7 +64,7 @@
       rules: {
         title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
         service: [{ required: true, message: '请输入服务', trigger: 'blur' }],
-        image: [{ required: true }],
+        image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
         contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
         phone: [{ required: true, message: '请输入联系电话'},
                 { min: 11, max: 11, message: '请输入11位联系电话', trigger: 'blur' },
@@ -76,7 +76,23 @@
     computed: {},
     methods: {
       submitForm() {
-        this.$emit('submitForm', { data: this.ruleForm });
+        if(!this.ruleForm.image){
+          this.$message.error('请上传图片');
+          return false;
+        }
+        if(!this.ruleForm.description){
+          this.$message.error('请输入机构介绍');
+          return false;
+        }
+        this.$refs['ruleForm'].validate((valid) => {
+          if (valid) {
+            this.$emit('submitForm', { data: this.ruleForm });
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+        /*this.$emit('submitForm', { data: this.ruleForm });*/
       },
       resetForm() {
         this.$emit('resetForm');

+ 13 - 2
src/layout/technicalService/technicalServiceList.vue

@@ -105,8 +105,19 @@
         this.multipleSelection = val;
       },
       deleteRow(id) {
-        this.$set(this, `currentPage`, 1);
-        this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit,type:this.type, ...this.search});
+        this.$confirm('确定删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$set(this, `currentPage`, 1);
+          this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
       },
       handleSizeChange(val) {
         this.$set(this, `currentPage`, 1);

+ 14 - 2
src/layout/zhidao/zhidaoForm.vue

@@ -49,14 +49,26 @@ export default {
     rules: {
       name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
       link: [{ required: true, message: '请输入链接', trigger: 'blur' }],
-      image: [{ required: true}],
+      image: [{ required: true, message: '请上传图片', trigger: 'blur'}],
     },
   }),
   created() {},
   computed: {},
   methods: {
     submitForm() {
-      this.$emit('submitForm', { data: this.ruleForm });
+      if(!this.ruleForm.image){
+        this.$message.error('请上传图片');
+        return false;
+      }
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+          this.$emit('submitForm', { data: this.ruleForm });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+      /*this.$emit('submitForm', { data: this.ruleForm });*/
     },
     resetForm() {
       this.$emit('resetForm');

+ 13 - 2
src/layout/zhidao/zhidaoList.vue

@@ -100,8 +100,19 @@
                 this.multipleSelection = val;
             },
             deleteRow(id) {
-                this.$set(this, `currentPage`, 1);
-                this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+                this.$confirm('确定删除吗?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.$set(this, `currentPage`, 1);
+                    this.$emit('deleteRow', {id: id, skip: 0, limit: this.limit, ...this.search});
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
             },
             handleSizeChange(val) {
                 this.$set(this, `currentPage`, 1);