zhuliu 2 yıl önce
ebeveyn
işleme
5de8519c35

+ 10 - 4
RMS-FrontEnd/src/views/components/articles/components/history/components/echarts/components/MultipleLine/index.vue

@@ -94,10 +94,10 @@ export default {
      this.drawer = true
      // this.$emit('form',this.form)
    },
-   open(chartData,name,relation){
+   open(chartData,name,relation,timeUnit){
      this.chartData = chartData
      this.relation = relation
-     var a = this.getOption(name,relation)
+     var a = this.getOption(name,relation,timeUnit)
      this.$nextTick(() => {
        this.initChart(this.id, a)
      })
@@ -126,7 +126,7 @@ export default {
        toolbox: toolbox
      }
  },
-   getOption(name,relation) {
+   getOption(name,relation,timeUnit) {
      this.form.setting.text.text = name
      this.form.setting.title1 = '时间'
      this.form.setting.title2 = '金额/万元'
@@ -186,7 +186,13 @@ export default {
      });
      this.selected = {
        x:timeList.sort((a,b)=>{
-         return a - b
+        if(timeUnit == 0){
+            return Date.parse(a.replace(/-/g, "/")) - Date.parse(b.replace(/-/g, "/"))
+          }else if(timeUnit==1){
+            return  Date.parse(a.match(/(\d{1,3})+(?:\.\d+)?/g).join('/'))-Date.parse(b.match(/(\d{1,3})+(?:\.\d+)?/g).join('/'))
+          }else{
+            return Date.parse(a.substring(0,a.length-1))-Date.parse(b.substring(0,b.length-1))
+          }
        }),
        y:data.map(item=>{return item.name}),
        data:data

+ 1 - 1
RMS-FrontEnd/src/views/components/articles/components/history/components/echarts/components/echarts.vue

@@ -151,7 +151,7 @@ export default {
                 licenseFee:'已发生的许可费用',
                 saleTotalMoney:'营销数据'
             }
-            this.$refs[this.component].open(this.chartData,'价值曲线',option)
+            this.$refs[this.component].open(this.chartData,'价值曲线',option,this.queryParams.timeUnit)
 
         },
         async changeEcharts(){

+ 10 - 4
RMS-FrontEnd/src/views/product/components/echarts/components/MultipleLine/index.vue

@@ -98,11 +98,11 @@ export default {
       this.drawer = true
       // this.$emit('form',this.form)
     },
-    open(chartData,name,relation){
+    open(chartData,name,relation,timeUnit){
       this.chartData = chartData
       this.relation = relation
       this.name = name
-      var a = this.getOption(name,relation)
+      var a = this.getOption(name,relation,timeUnit)
       this.$nextTick(() => {
         this.initChart(this.id, a)
       })
@@ -132,7 +132,7 @@ export default {
         toolbox:toolbox
       }
   },
-    getOption(name,relation) {
+    getOption(name,relation,timeUnit) {
       this.form.setting.text.text = name
       this.form.setting.title1 = relation.xStr
       this.form.setting.title2 = relation.yStr+'/万元'
@@ -173,7 +173,13 @@ export default {
       
       this.selected = {
         x:timeList.sort((a,b)=>{
-          return a - b
+          if(timeUnit == 0){
+            return Date.parse(a.replace(/-/g, "/")) - Date.parse(b.replace(/-/g, "/"))
+          }else if(timeUnit==1){
+            return  Date.parse(a.match(/(\d{1,3})+(?:\.\d+)?/g).join('/'))-Date.parse(b.match(/(\d{1,3})+(?:\.\d+)?/g).join('/'))
+          }else{
+            return Date.parse(a.substring(0,a.length-1))-Date.parse(b.substring(0,b.length-1))
+          }
         }),
         y:productNameList,
         data:data

+ 1 - 1
RMS-FrontEnd/src/views/product/components/echarts/components/echarts.vue

@@ -165,7 +165,7 @@ export default {
                     return item.productId!=0
                 }),name,relation.label)
             }else{
-                this.$refs[this.component].open([this.chartData],name,relation.label)
+                this.$refs[this.component].open([this.chartData],name,relation.label,this.queryParams.timeUnit)
             }
         },
         async changeEcharts(){

+ 1 - 0
RMS-FrontEnd/src/views/product/components/marketingData.vue

@@ -253,6 +253,7 @@ export default {
         close(){
             this.btnLoading = false
             this.visible = false
+            this.$refs.form.resetFields()
             this.form = {}
         },
         //编辑销售量

+ 8 - 5
RMS-FrontEnd/src/views/product/components/product.vue

@@ -135,8 +135,8 @@
           <el-input v-model="productForm.companyName" :disabled="productForm.tenantId?true:false" placeholder="请输入所属公司"></el-input>
         </el-form-item>
        
-        <el-form-item label="参考许可费率 " prop="licenseRates">
-          <el-input v-model="productForm.licenseRates" placeholder="请输入参考许可费率(参考许可费率介于0-1之间)"></el-input>
+        <el-form-item label="参考许可费率 " prop="licenseRate">
+          <el-input v-model="productForm.licenseRate" placeholder="请输入参考许可费率(参考许可费率介于0-1之间)"></el-input>
         </el-form-item>
         <el-form-item label="图片 ">
           <el-upload ref="upload"  action="#" :auto-upload="false"  :on-change="handleChange"  list-type="picture" :show-file-list="false">
@@ -174,7 +174,7 @@
       append-to-body
       :close-on-click-modal="false"
       :before-close="categoryClose">
-      <el-form :rules="categoryRules" ref="categoryForm" :model="categoryForm" label-width="80px">
+      <el-form :rules="categoryRules" ref="categoryForm" :model="categoryForm" label-width="110">
         <el-form-item label="名称 " prop="productCategoryName">
           <el-input v-model="categoryForm.productCategoryName" placeholder="请输入名称"></el-input>
         </el-form-item>
@@ -269,6 +269,7 @@ export default {
       },
       categoryRules:{
         productCategoryName:[{ required: true, message: '请输入产品类别名称', trigger: 'blur' },],
+        licenseRate:[{ required: false, validator:licenseRateRule, trigger: 'blur' },],
       },
       isCollapse:false,
     }
@@ -390,6 +391,7 @@ export default {
     categoryClose() {
       this.categoryVisible = false
       this.$refs.upload.clearFiles()
+      this.$refs.categoryForm.resetFields()
       this.categoryForm = {}
       this.file=[]
     },
@@ -452,8 +454,8 @@ export default {
     productFormSelect(val) {
       this.options.forEach(item => {
         if (item.id == val) {
-          this.productForm.licenseRate=item.licenseRate
-          this.$set(this.productForm,'licenseRates',item.licenseRate)
+          // this.productForm.licenseRate=item.licenseRate
+          this.$set(this.productForm,'licenseRate',item.licenseRate)
         }
       })
     },
@@ -591,6 +593,7 @@ export default {
       this.productForm = {}
       this.file = []
       this.$refs.upload.clearFiles()
+      this.$refs.productForm.resetFields()
       this.visible = false
     },
     // 分页

+ 1 - 1
RMS-FrontEnd/src/views/report/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div style="background:white;min-width:1100px">
+    <div style="background:white;min-width:1400px">
         <div style="height:50px">
             <div style="display:inline-block;margin-left:20px;display:flex;justify-content: space-between;align-items:center">
                 <el-dropdown size="small" style="margin-right:20px" v-if="$permission('/pcs/report/add')">