Commit 9264ee33 authored by 裴文涛's avatar 裴文涛
parents d012103a f502f925
import select from "./select.vue";
import input from "./input.vue";
import dateTimePicker from "./dateTimePicker.vue";
import switchs from "./switchs.vue"
export default {
select,
input,
dateTimePicker
dateTimePicker,
switchs
};
<script setup>
import { ref } from "vue";
import emitter from "@/utils/mitter";
import mitter from "@/utils/mitter";
const porps = defineProps({
items: Object,
prop: String,
......@@ -10,22 +10,12 @@ const value = ref("");
// 选择某一项之后触发changeVale事件
const onChangeFirstValue = (val) => {
emitter.emit("changeVal", { name: porps.prop, value: value.value });
mitter.emit("changeVal", { name: porps.prop, value: value.value });
};
</script>
<template>
<el-select
v-model="value"
:v-bind="items"
style="width: 100%;"
@change="onChangeFirstValue(value)"
>
<el-option
v-for="item in items.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-model="value" :v-bind="items" style="width: 100%;" @change="onChangeFirstValue(value)">
<el-option v-for="item in items.options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</template>
\ No newline at end of file
<script setup>
import mitter from "@/utils/mitter";
import { ref } from "vue";
const props = defineProps({
items: Object,
prop: String,
});
const value = ref("");
const switchs = () => {
mitter.emit("changeVal", { name: props.prop, value: value.value });
};
</script>
<template>
<el-switch @change="switchs" v-model="value" class="ml-2" :v-bind="items"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" />
</template>
<script setup>
import mitter from "@/utils/mitter";
import { ref } from "vue";
const props = defineProps({
items: Object,
prop: String,
});
const fileList = ref("");
const upload = () => {
mitter.emit("changeVal", { name: props.prop, value: fileList.value });
};
</script>
<template>
<el-upload v-model:file-list="fileList" class="upload-demo" @upload="upload" v-bind="items"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :on-preview="handlePreview"
:on-remove="handleRemove" :before-remove="beforeRemove" :limit="3" :on-exceed="handleExceed" />
</template>
......@@ -404,8 +404,8 @@ const routes = [
{
path: "/Scheduling/EnergyManage",
name: "EnergyManagePage",
component: () => import("@/views/SmartNumbers/PipeTemperature.vue"),
// component: () => import("@/views/SchedulingPage/EnergyManagePage.vue"),
// component: () => import("@/views/SmartNumbers/PipeTemperature.vue"),
component: () => import("@/views/SchedulingPage/EnergyManagePage.vue"),
meta: {
title: "能源消耗",
},
......
......@@ -105,7 +105,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="param.cnName"></el-input>
<el-input :disabled="true" style="width: 80%" v-model="param.cnName"></el-input>
</td>
</tr>
</table>
......
......@@ -8,7 +8,7 @@
<el-form ref="formRef" :rules="rules" :model="List" label-width="auto">
<table v-loading="loading" cellpadding="0" cellspacing="1">
<tr>
<th style="width: 25%">计划名称</th>
<th style="width: 25%">计划名称</th>
<td style="width: 60%; margin:0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
......@@ -22,7 +22,7 @@
</td>
</tr>
<tr>
<th style="width: 25%">偏差百分比 (%)</th>
<th style="width: 25%">偏差百分比 (%)</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
......@@ -36,7 +36,7 @@
</td>
</tr>
<tr>
<th style="width: 25%">判断时间 (分)</th>
<th style="width: 25%">判断时间 (分)</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
......
......@@ -116,4 +116,19 @@ export const schemas = ref([
timeFormat: "HH:mm:ss",
},
},
{
// label: "设备名称",
prop: "name",
type: "switchs",
colProps: {
xs: 12,
sm: 12,
md: 12,
lg: 6,
xl: 6,
},
componentProps: {
placeholder: "请输入设备名称",
},
}
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment