Browse Source

添加图表补上柱形图设置

cxmo 1 year ago
parent
commit
229911730d
1 changed files with 20 additions and 2 deletions
  1. 20 2
      src/views/dataEntry_manage/addChart.vue

+ 20 - 2
src/views/dataEntry_manage/addChart.vue

@@ -57,13 +57,28 @@
 						/>
 					</el-form-item>
 					<el-form-item label="图表单位" prop="Unit" v-if="chartInfo.ChartType===7">
-						<el-input
+						<!-- <el-input
 							v-model="chartInfo.Unit"
 							style="width: 90%"
 							placeholder="请输入图表单位"
 							clearable
 							@change="changeUnit"
-						/>
+						/> -->
+						<el-select
+							v-model="chartInfo.Unit"
+							filterable
+							allow-create
+							default-first-option
+							clearable
+							@change="changeUnit"
+							placeholder="请输入图表单位">
+							<el-option
+								v-for="item in UnitOptions"
+								:key="item"
+								:label="item"
+								:value="item">
+							</el-option>
+						</el-select>
 					</el-form-item>
 				</el-form>
 
@@ -487,6 +502,7 @@
 <script>
 import { dataBaseInterface } from '@/api/api.js';
 import { chartSetMixin } from './mixins/chartPublic';
+import {unitArr} from '@/utils/defaultOptions.js';
 import addOrEditMixn from './mixins/addOreditMixin';
 import Chart from './components/chart';
 import DateChooseDia from './components/DateChooseDia';
@@ -561,6 +577,8 @@ export default {
 			needWatch: true,
 			IsNameDefault:true,
 
+			UnitOptions:unitArr
+
     };
   },
   methods: {