chenxinlei 2 лет назад
Родитель
Сommit
a4e388837c
4 измененных файлов с 157 добавлено и 119 удалено
  1. 23 6
      src/api/table.js
  2. 67 73
      src/router/index.js
  3. 45 23
      src/views/indicators/components/TableEdit.vue
  4. 22 17
      src/views/indicators/index.vue

+ 23 - 6
src/api/table.js

@@ -1,5 +1,14 @@
 import request from '@/utils/request'
 
+// POST
+// /pro-basic-project-plan/add
+// 工程计划电量-新增or修改
+// GET
+// /pro-basic-project-plan/List
+// 工程计划电量-列表
+// DELETE
+// /pro-basic-project-plan/remove-ProjectPlan/{ids}
+// 工程计划电量-删除
 const projectplan = (data) => {
   return request({
     url: `pro-basic-project-plan/List?windpowerstationId=${data.windpowerstationId}&projectId=${data.projectId}&pageNum=${data.pagenum}&pageSize=${data.pagesize}`,
@@ -25,23 +34,31 @@ const wtls = (data) => {
     method: 'get',
   })
 }
-
+// DELETE
+// /pro-basic-target-plan/{ids}
+// 指标计划表-删除
+// POST
+// /pro-basic-target-plan/add
+// 指标计划表-新增or修改
+// GET
+// /pro-basic-target-plan/list
+// 指标计划表-列表
 const indicators = (data) => {
   return request({
-    url: `indicators/List?stationid=${data.windpowerstationid}&stationname=${data.name}&pageNum=${data.pagenum}&pageSize=${data.pagesize}`,
+    url: `pro-basic-target-plan/list?companyCode=${data.companyCode}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
     method: 'get',
   })
 }
 const addIndicators = (pairs) => {
   return request({
-    url: `indicators/add`,
+    url: `pro-basic-target-plan/add`,
     method: 'post',
     data: pairs,
   })
 }
 const removeIndicators = (data) => {
   return request({
-    url: `/indicators/${data.id}`,
+    url: `/pro-basic-target-plan/${data.id}`,
     method: 'delete',
   })
 }
@@ -55,8 +72,8 @@ const newtreeTreels = (data) => {
 // 可研电量
 const projectstudy = (data) => {
   return request({
-      url:`/projectstudy/List?windpower=${data.windpower}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-      method:"get"
+    url: `/projectstudy/List?windpower=${data.windpower}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    method: 'get',
   })
 }
 const addProjectstudy = (pairs) => {

+ 67 - 73
src/router/index.js

@@ -50,18 +50,18 @@ export const asyncRoutes = [
   },
 
   {
-    path: "/indicators",
+    path: '/indicators',
     component: Layout,
-    redirect: "noRedirect",
+    redirect: 'noRedirect',
     children: [
       {
-        path: "indicators",
-        name: "indicators",
-        component: () => import("@/views/indicators/index"),
+        path: 'indicators',
+        name: 'indicators',
+        component: () => import('@/views/indicators/index'),
         meta: {
-          title: "指标录入",
-          icon: "marker",
-          permissions: ["admin"],
+          title: '指标录入',
+          icon: 'marker',
+          permissions: ['admin'],
         },
       },
     ],
@@ -76,44 +76,38 @@ export const asyncRoutes = [
       {
         path: 'group',
         name: 'group',
-        component: () =>
-          import('@/views/stationConfiguration/group/index'),
+        component: () => import('@/views/stationConfiguration/group/index'),
         meta: { title: '集团管理' },
       },
       {
         path: 'area',
         name: 'area',
-        component: () =>
-          import('@/views/stationConfiguration/area/index'),
+        component: () => import('@/views/stationConfiguration/area/index'),
         meta: { title: '区域管理' },
       },
       {
         path: 'company',
         name: 'company',
-        component: () =>
-          import('@/views/stationConfiguration/company/index'),
+        component: () => import('@/views/stationConfiguration/company/index'),
         meta: { title: '公司管理' },
       },
-      
+
       {
         path: 'station',
         name: 'station',
-        component: () =>
-          import('@/views/stationConfiguration/station/index'),
+        component: () => import('@/views/stationConfiguration/station/index'),
         meta: { title: '场站管理' },
       },
       {
         path: 'period',
         name: 'period',
-        component: () =>
-          import('@/views/stationConfiguration/period/index'),
+        component: () => import('@/views/stationConfiguration/period/index'),
         meta: { title: '期次管理' },
       },
       {
         path: 'line',
         name: 'line',
-        component: () =>
-          import('@/views/stationConfiguration/line/index'),
+        component: () => import('@/views/stationConfiguration/line/index'),
         meta: { title: '线路管理' },
       },
       {
@@ -123,97 +117,97 @@ export const asyncRoutes = [
           import('@/views/stationConfiguration/windterbin/index'),
         meta: { title: '风机管理' },
       },
-			{
+      {
         path: 'equipmentmodel',
         name: 'equipmentmodel',
         component: () =>
           import('@/views/stationConfiguration/equipmentmodel/index'),
         meta: { title: '设备型号' },
       },
-			{
+      {
         path: 'manufacturer',
         name: 'manufacturer',
         component: () =>
           import('@/views/stationConfiguration/manufacturer/index'),
         meta: { title: '设备厂商' },
       },
-			{
+      {
         path: 'modelpower',
         name: 'modelpower',
         component: () =>
           import('@/views/stationConfiguration/modelpower/index'),
         meta: { title: '设备类型' },
       },
-			{
+      {
         path: 'windsubstation',
         name: 'windsubstation',
         component: () =>
           import('@/views/stationConfiguration/windsubstation/index'),
         meta: { title: '变电所' },
       },
-			{
-        path: 'projectstudy',
-        name: 'projectstudy',
-        component: () =>
-          import('@/views/stationConfiguration/projectstudy/index'),
-        meta: { title: '可研电量' },
-      },
-			{
-        path: 'admlist',
-        name: 'admlist',
-        component: () =>
-          import('@/views/stationConfiguration/admlist/index'),
-        meta: { title: '装机量管理' },
-      },
+      // {
+      //   path: 'projectstudy',
+      //   name: 'projectstudy',
+      //   component: () =>
+      //     import('@/views/stationConfiguration/projectstudy/index'),
+      //   meta: { title: '可研电量' },
+      // },
+      // {
+      //   path: 'admlist',
+      //   name: 'admlist',
+      //   component: () =>
+      //     import('@/views/stationConfiguration/admlist/index'),
+      //   meta: { title: '装机量管理' },
+      // },
     ],
   },
+  // {
+  //   path: '/pointConfiguration',
+  //   component: Layout,
+  //   redirect: 'noRedirect',
+  //   children: [
+  //     {
+  //       path: 'pointConfiguration',
+  //       name: 'pointConfiguration',
+  //       component: () => import('@/views/pointConfiguration/index'),
+  //       meta: {
+  //         title: '测点配置',
+  //         icon: 'allergies',
+  //         permissions: ['admin'],
+  //       },
+  //     },
+  //   ],
+  // },
   {
-    path: "/pointConfiguration",
-    component: Layout,
-    redirect: "noRedirect",
-    children: [
-      {
-        path: "pointConfiguration",
-        name: "pointConfiguration",
-        component: () => import("@/views/pointConfiguration/index"),
-        meta: {
-          title: "测点配置",
-          icon: "allergies",
-          permissions: ["admin"],
-        },
-      },
-    ],
-  },
-	{
-    path: "/meterpoint",
+    path: '/meterpoint',
     component: Layout,
-    redirect: "noRedirect",
+    redirect: 'noRedirect',
     children: [
       {
-        path: "meterpoint",
-        name: "meterpoint",
-        component: () => import("@/views/meterpoint/index"),
+        path: 'meterpoint',
+        name: 'meterpoint',
+        component: () => import('@/views/meterpoint/index'),
         meta: {
-          title: "电计量配置",
-          icon: "allergies",
-          permissions: ["admin"],
+          title: '电计量配置',
+          icon: 'allergies',
+          permissions: ['admin'],
         },
       },
     ],
   },
-	{
-    path: "/realDatabaseConfig",
+  {
+    path: '/realDatabaseConfig',
     component: Layout,
-    redirect: "noRedirect",
+    redirect: 'noRedirect',
     children: [
       {
-        path: "realDatabaseConfig",
-        name: "realDatabaseConfig",
-        component: () => import("@/views/realDatabaseConfig/index"),
+        path: 'realDatabaseConfig',
+        name: 'realDatabaseConfig',
+        component: () => import('@/views/realDatabaseConfig/index'),
         meta: {
-          title: "实时数据库配置",
-          icon: "allergies",
-          permissions: ["admin"],
+          title: '实时数据库配置',
+          icon: 'allergies',
+          permissions: ['admin'],
         },
       },
     ],

+ 45 - 23
src/views/indicators/components/TableEdit.vue

@@ -1,14 +1,14 @@
 <template>
   <el-dialog :title="title" :visible.sync="dialogFormVisible" width="800px" @close="close">
     <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-      <el-form-item label="场站" prop="stationid">
+      <!-- <el-form-item label="场站" prop="stationid">
         <el-cascader ref="cascaderRef" @change="cascaderChange" v-model="form.stationid" :options="options"
           style="width: 200px" :props="{ checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
           clearable />
       </el-form-item>
       <el-form-item label="录入时间" prop="createtime">
         <el-date-picker style="width: 200px" v-model="form.createtime" type="datetime" placeholder="选择日期时间">
-        </el-date-picker>
+      </el-date-picker>
       </el-form-item>
       <el-form-item label="指标" prop="kay">
         <el-select style="width: 200px" v-model="form.kay" placeholder="请选择" clearable
@@ -16,9 +16,30 @@
           <el-option v-for="item in standardList" :key="item.uniformcode" :label="item.name" :value="item.uniformcode">
           </el-option>
         </el-select>
+      </el-form-item> -->
+      <!-- <el-table-column show-overflow-tooltip label="编号" prop="id" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="组织机构编码" prop="companyCode" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="指标编码" prop="targetCode" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="时间" prop="targetDate" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="值" prop="targetValue" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="周期" prop="targetCycle" align="center" sortable></el-table-column> -->
+      <el-form-item label="编号" prop="id">
+        <el-input style="width: 200px" class="inputs" v-model="form.id" placeholder="请输入"></el-input>
       </el-form-item>
-      <el-form-item label="值" prop="value">
-        <el-input style="width: 200px" class="inputs" v-model="form.value" placeholder="请输入"></el-input>
+      <el-form-item label="组织机构编码" prop="companyCode">
+        <el-input style="width: 200px" class="inputs" v-model="form.companyCode" placeholder="请输入"></el-input>
+      </el-form-item>
+      <el-form-item label="指标编码" prop="targetCode">
+        <el-input style="width: 200px" class="inputs" v-model="form.targetCode" placeholder="请输入"></el-input>
+      </el-form-item>
+      <el-form-item label="时间" prop="targetDate">
+        <el-date-picker style="width: 200px" v-model="form.targetDate" type="datetime" placeholder="选择日期时间"></el-date-picker>
+      </el-form-item>
+      <el-form-item label="值" prop="targetValue">
+        <el-input style="width: 200px" class="inputs" v-model="form.targetValue" placeholder="请输入"></el-input>
+      </el-form-item>
+      <el-form-item label="周期" prop="targetCycle">
+        <el-input style="width: 200px" class="inputs" v-model="form.targetCycle" placeholder="请输入"></el-input>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -51,19 +72,20 @@ export default {
     return {
       keyList: [{ name: '发电量' }, { name: '平均功率' }, { name: '最优功率' }],
       form: {
-        kay: '',
-        createtime: '',
-        stationid: '',
-        stationname: '',
-        stationidArr: '',
-        stationnameArr: '',
-        value: '',
+        id: "",
+        companyCode: "",
+        targetCode: "",
+        targetDate: "",
+        targetValue: "",
+        targetCycle: "",
       },
       rules: {
-        stationid: [{ required: true, trigger: 'blur', message: '请选择' }],
-        kay: [{ required: true, trigger: 'blur', message: '请选择' }],
-        value: [{ required: true, trigger: 'blur', message: '请输入' }],
-        createtime: [{ required: true, trigger: 'blur', message: '请选择' }],
+        id: [{ required: true, trigger: 'blur', message: '请输入' }],
+        companyCode: [{ required: true, trigger: 'blur', message: '请输入' }],
+        targetCode: [{ required: true, trigger: 'blur', message: '请输入' }],
+        targetDate: [{ required: true, trigger: 'blur', message: '请选择' }],
+        targetValue: [{ required: true, trigger: 'blur', message: '请输入' }],
+        targetCycle: [{ required: true, trigger: 'blur', message: '请输入' }],
       },
       title: '',
       dialogFormVisible: false,
@@ -72,10 +94,10 @@ export default {
   },
   created() { },
   methods: {
-    cascaderChange(data) {
-      this.form.stationidArr = data
-      this.form.stationnameArr = this.$refs["cascaderRef"].getCheckedNodes()[0].pathLabels
-    },
+    // cascaderChange(data) {
+    //   this.form.stationidArr = data
+    //   this.form.stationnameArr = this.$refs["cascaderRef"].getCheckedNodes()[0].pathLabels
+    // },
     showEdit(row) {
       if (!row) {
         this.title = '添加'
@@ -84,7 +106,7 @@ export default {
         this.title = '编辑'
         this.idAdd = false
         this.form = Object.assign({}, row)
-        this.form.stationid = row.stationid.split(",")
+        // this.form.stationid = row.stationid.split(",")
       }
       this.dialogFormVisible = true
     },
@@ -97,9 +119,9 @@ export default {
     handleSave() {
       this.$refs['form'].validate(async (valid) => {
         if (valid) {
-          this.form.stationid = this.form.stationid.join(",")
-          this.form.stationname = this.form.stationnameArr[this.form.stationnameArr.length - 1]
-          this.form.createtime = dayjs(this.form.createtime).format("YYYY-MM-DD HH:mm:ss")
+          // this.form.stationid = this.form.stationid.join(",")
+          // this.form.stationname = this.form.stationnameArr[this.form.stationnameArr.length - 1]
+          this.form.targetDate = dayjs(this.form.targetDate).format("YYYY-MM-DD HH:mm:ss")
           api.addIndicators(this.form).then(res => {
             if (res.code == 200) {
               this.$message({

+ 22 - 17
src/views/indicators/index.vue

@@ -12,7 +12,7 @@
             clearable />
         </div> -->
 				<div class="left-item">
-					<div style="width: 100px;">风场名称:</div>
+					<div style="width: 150px;">组织机构编码:</div>
 					<el-input v-model="fuzzyQuery" placeholder="请输入" clearable />
 				</div>
 				<el-button icon="el-icon-search" type="primary" native-type="submit" @click="handleQuery">
@@ -28,20 +28,26 @@
 				</el-button>
 			</div>
 		</div>
+    <!-- 
+      
+      ✓	id	编号	VARCHAR2	50			编号
+      Comapny_Code	组织机构编码	VARCHAR2	50	✓		组织机构编码
+      target_Code	指标编码	VARCHAR2	50	✓		指标编码
+      target_Date	时间	VARCHAR2	50	✓		时间
+      Target_Value	值	NUMBER	18,2	✓		值
+      Target_cycle	周期	VARCHAR2	50	✓		周期
+     -->
 		<el-table ref="tableSort" v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText"
       header-cell-class-name="table_header_style" border
 			:height="height" @selection-change="setSelectRows">
 			<!-- show-summary :summary-method="getSummaries" -->
 			<el-table-column width="55" align="center" show-overflow-tooltip type="selection"></el-table-column>
-			<el-table-column show-overflow-tooltip label="风场编号" prop="stationid" align="center" sortable>
-			</el-table-column>
-			<el-table-column show-overflow-tooltip label="风场名称" prop="stationname" align="center" sortable></el-table-column>
-			<el-table-column show-overflow-tooltip label="指标" prop="kay" align="center" sortable>
-			</el-table-column>
-			<el-table-column show-overflow-tooltip label="值" prop="value" align="center" sortable>
-			</el-table-column>
-			<el-table-column show-overflow-tooltip label="录入时间" prop="createtime" align="center" sortable>
-			</el-table-column>
+			<el-table-column show-overflow-tooltip label="编号" prop="id" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="组织机构编码" prop="companyCode" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="指标编码" prop="targetCode" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="时间" prop="targetDate" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="值" prop="targetValue" align="center" sortable></el-table-column>
+			<el-table-column show-overflow-tooltip label="周期" prop="targetCycle" align="center" sortable></el-table-column>
 			<el-table-column show-overflow-tooltip label="操作" width="180px" fixed="right">
 				<template #default="{ row }">
 					<el-button type="text" @click="handleEdit(row)">编辑</el-button>
@@ -105,10 +111,10 @@ export default {
 		},
 	},
 	created() {
-		this.getStation()
-		this.getStandard()
+		// this.getStation()
+		// this.getStandard()
 		this.fetchData()
-		this.getTree()
+		// this.getTree()
 	},
 	beforeDestroy() { },
 	mounted() { },
@@ -190,10 +196,9 @@ export default {
 		fetchData() {
 			this.listLoading = true
 			api.indicators({
-				windpowerstationid: this.selectValue,
-				name: this.fuzzyQuery,
-				pagenum: this.queryForm.pageNo,
-				pagesize: this.queryForm.pageSize,
+				companyCode: this.fuzzyQuery,
+				pageNum: this.queryForm.pageNo,
+				pageSize: this.queryForm.pageSize,
 			}).then(res => {
 				if (res.data) {
 					this.total = res.data.total