Эх сурвалжийг харах

供应分析-装置检修

jwyu 1 жил өмнө
parent
commit
7ef75890bf

+ 34 - 0
src/lang/modules/SupplyAnalysis/StockPlant.js

@@ -22,6 +22,23 @@ export const StockPlantEn = {
     year_product_day:'Days of Production/Year',
     day_unit:'day',
     computed_btn:'Calculate Days',
+
+    edit_table_col01:'Place',
+    edit_table_col02:'Corporate Name',
+    edit_table_col03:'Equipment/Production Line',
+    edit_table_col04:'Capacity/10,000 tons',
+    edit_table_col05:'Overhaul Date',
+    edit_table_col06:'Resumption Date',
+    edit_table_col07:'Operating Rate Decreased',
+    edit_table_col08:'Production Decreased per Day/ton',
+    edit_table_col09:'Duration',
+    edit_table_col10:'Total Cuts',
+    edit_table_col_tip01:'默认检修结束日期为复产日期',
+    edit_table_col_tip02:'1表示停产,0.1表示降负10%',
+    edit_table_btn_add_up:'Add above',
+    edit_table_btn_add_down:'Add below',
+    edit_table_btn_add_other:'Add New Equipment/Production Line',
+    placeholder04:'Please Select Commodity',
 };
   
 /* 中文 */
@@ -44,6 +61,23 @@ export const StockPlantZh = {
     year_product_day:'年生产天数',
     day_unit:'天',
     computed_btn:'计算',
+
+    edit_table_col01:'地点',
+    edit_table_col02:'工厂',
+    edit_table_col03:'装置/产线',
+    edit_table_col04:'年产能(万吨)',
+    edit_table_col05:'检修日期',
+    edit_table_col06:'复产日期',
+    edit_table_col07:'降负系数',
+    edit_table_col08:'日均产量减量(吨)',
+    edit_table_col09:'时长',
+    edit_table_col10:'期间减量(万吨)',
+    edit_table_col_tip01:'默认检修结束日期为复产日期',
+    edit_table_col_tip02:'1表示停产,0.1表示降负10%',
+    edit_table_btn_add_up:'向上添加',
+    edit_table_btn_add_down:'向下添加',
+    edit_table_btn_add_other:'添加其他装置',
+    placeholder04:'请选择品种',
 };
   
 /**

+ 39 - 16
src/views/supply_manage/components/addOtherPlantDia.vue

@@ -7,13 +7,13 @@
     custom-class="variety-set-dialog"
     top="10vh"
     v-dialogDrag
-    title="添加其他装置"
+    :title="$t('SupplyAnalysis.StockPlant.edit_table_btn_add_other')"
 		width="1000px"
   >
     <div class="main">
       <el-select
           v-model="searchTxt"
-          placeholder="请选择品种"
+          :placeholder="$t('SupplyAnalysis.StockPlant.placeholder04')"
           style="margin-bottom: 20px;"
           clearable
           @change="getPlantList"
@@ -29,7 +29,7 @@
         :data="plantData"
         border
         :max-height="300"
-        empty-text="暂无装置信息"
+        :empty-text="$t('Table.prompt_slogan')"
         @selection-change="selectPlant"
       >
         <el-table-column
@@ -62,8 +62,8 @@
       </div>
     </div>
     <div class="dia-bot">
-			<el-button type="primary" style="margin-right: 20px" @click="saveHandle">保存</el-button>
-			<el-button type="primary" plain @click="cancelHandle('cancel')">取消</el-button>
+			<el-button type="primary" style="margin-right: 20px" @click="saveHandle">{{$t('Dialog.confirm_save_btn')}}</el-button>
+			<el-button type="primary" plain @click="cancelHandle('cancel')">{{$t('Dialog.cancel_btn')}}</el-button>
 		</div>
   </el-dialog>
 </template>
@@ -88,30 +88,53 @@ export default {
       this.getVarietyList();
     }
   },
-  data() {
-    return {
-      searchTxt: '',
-      varietyOptions:[],
-      plantData: [],
-      tableColums: [
+  computed:{
+    tableColums(){
+      return [
         {
-          label: '地点',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col01')/* '地点' */,
           key: 'address',
           minwidthsty: '120px'
         },
         {
-          label: '工厂',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col02')/* '工厂' */,
           key: 'FactoryName'
         },
         {
-          label: '装置/产线',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col03')/* '装置/产线' */,
           key: 'PlantName'
         },
         {
-          label: '年产能(万吨)',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col04')/* '年产能(万吨)' */,
           key: 'AnnualCapacity'
         },
-      ],
+      ]
+    }
+  },
+  data() {
+    return {
+      searchTxt: '',
+      varietyOptions:[],
+      plantData: [],
+      // tableColums: [
+      //   {
+      //     label: '地点',
+      //     key: 'address',
+      //     minwidthsty: '120px'
+      //   },
+      //   {
+      //     label: '工厂',
+      //     key: 'FactoryName'
+      //   },
+      //   {
+      //     label: '装置/产线',
+      //     key: 'PlantName'
+      //   },
+      //   {
+      //     label: '年产能(万吨)',
+      //     key: 'AnnualCapacity'
+      //   },
+      // ],
 
       selectPlants: []
     }

+ 84 - 29
src/views/supply_manage/components/plantTable.vue

@@ -122,17 +122,17 @@
           </template>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" v-if="$route.query.type!=='look'" width="200">
+      <el-table-column :label="$t('Table.column_operations')" align="center" v-if="$route.query.type!=='look'" width="200">
         <template slot-scope="scope">
-          <el-button type="text" @click="addRow(scope,'copy')">复制</el-button>
-          <el-button type="text" @click="addRow(scope,'prev')">向上添加</el-button>
-          <el-button type="text" @click="addRow(scope,'next')">向下添加</el-button>
-          <span @click="delPlant(scope.row,scope.$index)" class="deletesty">删除</span>
-          <el-button type="text" @click="addOtherPlantHandle(scope.row.VarietyPlantId)">添加其他装置</el-button>
+          <el-button type="text" @click="addRow(scope,'copy')">{{$t('Table.copy_btn')}}</el-button>
+          <el-button type="text" @click="addRow(scope,'prev')">{{$t('SupplyAnalysis.StockPlant.edit_table_btn_add_up')}}</el-button>
+          <el-button type="text" @click="addRow(scope,'next')">{{$t('SupplyAnalysis.StockPlant.edit_table_btn_add_down')}}</el-button>
+          <span @click="delPlant(scope.row,scope.$index)" class="deletesty">{{$t('Table.delete_btn')}}</span>
+          <el-button type="text" @click="addOtherPlantHandle(scope.row.VarietyPlantId)">{{$t('SupplyAnalysis.StockPlant.edit_table_btn_add_other')}}</el-button>
         </template>
       </el-table-column>
       <div slot="empty" style="padding: 20px 0">
-        <tableNoData text="暂无信息" size="mini"/>
+        <tableNoData :text="$t('Table.prompt_slogan')" size="mini"/>
       </div>
     </el-table>
 
@@ -160,62 +160,117 @@ export default {
       this.tableData = nval.length ? nval : this.initTable;
     }
   },
-  data() {
-    return {
-      province_sorce,
-      city_sorce,
-      tableData: this.data,
-      tableColums: [
+  computed:{
+    tableColums(){
+      return [
         {
-          label: '地点',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col01')/* '地点' */,
           key: 'address',
           minwidthsty: '140px'
         },
         {
-          label: '工厂',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col02')/* '工厂' */,
           key: 'FactoryName'
         },
         {
-          label: '装置/产线',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col03')/* '装置/产线' */,
           key: 'PlantName'
         },
         {
-          label: '年产能(万吨)',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col04')/* '年产能(万吨)' */,
           key: 'AnnualCapacity'
         },
         {
-          label: '检修日期',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col05')/* '检修日期' */,
           key: 'MaintenanceDate',
           widthsty: '150px'
         },
         {
-          label: '复产日期',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col06')/* '复产日期' */,
           key: 'ResumptionDate',
-          tip: '默认检修结束日期为复产日期',
+          tip: this.$t('SupplyAnalysis.StockPlant.edit_table_col_tip01')/* '默认检修结束日期为复产日期' */,
           widthsty: '220px'
         },
         {
-          label: '降负系数',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col07')/* '降负系数' */,
           key: 'Coefficient',
           widthsty: '80px',
-          tip: '1表示停产,0.1表示降负10%'
+          tip: this.$t('SupplyAnalysis.StockPlant.edit_table_col_tip02'),/* '1表示停产,0.1表示降负10%' */
         },
         {
-          label: '日均产量减量(吨)',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col08')/* '日均产量减量(吨)' */,
           key: 'AverageDailyCapacityReductionTon',
           widthsty: '100px',
         },
         {
-          label: '时长',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col09')/* '时长' */,
           key: 'Day',
           widthsty: '80px',
         },
         {
-          label: '期间减量(万吨)',
+          label: this.$t('SupplyAnalysis.StockPlant.edit_table_col10')/* '期间减量(万吨)' */,
           key: 'CapacityReduction',
-          widthsty: '80px',
+          widthsty: '100px',
         },
-      ],
+      ]
+    }
+  },
+  data() {
+    return {
+      province_sorce,
+      city_sorce,
+      tableData: this.data,
+      // tableColums: [
+      //   {
+      //     label: '地点',
+      //     key: 'address',
+      //     minwidthsty: '140px'
+      //   },
+      //   {
+      //     label: '工厂',
+      //     key: 'FactoryName'
+      //   },
+      //   {
+      //     label: '装置/产线',
+      //     key: 'PlantName'
+      //   },
+      //   {
+      //     label: '年产能(万吨)',
+      //     key: 'AnnualCapacity'
+      //   },
+      //   {
+      //     label: '检修日期',
+      //     key: 'MaintenanceDate',
+      //     widthsty: '150px'
+      //   },
+      //   {
+      //     label: '复产日期',
+      //     key: 'ResumptionDate',
+      //     tip: '默认检修结束日期为复产日期',
+      //     widthsty: '220px'
+      //   },
+      //   {
+      //     label: '降负系数',
+      //     key: 'Coefficient',
+      //     widthsty: '80px',
+      //     tip: '1表示停产,0.1表示降负10%'
+      //   },
+      //   {
+      //     label: '日均产量减量(吨)',
+      //     key: 'AverageDailyCapacityReductionTon',
+      //     widthsty: '100px',
+      //   },
+      //   {
+      //     label: '时长',
+      //     key: 'Day',
+      //     widthsty: '80px',
+      //   },
+      //   {
+      //     label: '期间减量(万吨)',
+      //     key: 'CapacityReduction',
+      //     widthsty: '80px',
+      //   },
+      // ],
 
       initTable: [{
           VarietyPlantId: 0,
@@ -250,11 +305,11 @@ export default {
   methods: {
     async delPlant({VarietyPlantId},index) {
       if(VarietyPlantId) {
-        await this.$confirm('删除后不可恢复,确认删除吗?','提示',{ type: 'warning' })
+        await this.$confirm(this.$t('MsgPrompt.delete_info_msg'),this.$t('Confirm.prompt'),{ type: 'warning' })
         const res = await supplyApi.delPlant({VarietyPlantId});
         if(res.Ret !== 200) return
   
-        this.$message.success('删除成功');
+        this.$message.success(this.$t('MsgPrompt.delete_msg'));
         this.$emit('getData')
       }else {
         this.tableData.splice(index,1)