Browse Source

fix: 大屏组件优化

main
wxc 1 year ago
parent
commit
d4cc7eac0c
  1. 1
      .browserslistrc
  2. 8
      src/components/datav/chart-bar.vue
  3. 7
      src/components/datav/tabs.vue
  4. 12
      src/views/work/Todo.vue

1
.browserslistrc

@ -0,0 +1 @@
ie >= 11

8
src/components/datav/chart-bar.vue

@ -56,6 +56,10 @@ const props = defineProps({
type: String, type: String,
default: "", default: "",
}, },
color: {
type: Object,
default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)"
}
}); });
const max = ref(100); const max = ref(100);
@ -77,6 +81,10 @@ onMounted(() => {
}) })
function getColor(val) { function getColor(val) {
if (props.color instanceof String) {
return props.color;
}
if (val > 0.8) { if (val > 0.8) {
return "linear-gradient(270deg, #63e700 0%, #19674c 100%)"; return "linear-gradient(270deg, #63e700 0%, #19674c 100%)";
} }

7
src/components/datav/tabs.vue

@ -43,6 +43,13 @@ const props = defineProps({
}); });
const emit = defineEmits(["update:modelValue"]); const emit = defineEmits(["update:modelValue"]);
const activeTab = ref(props.modelValue); const activeTab = ref(props.modelValue);
watch(() => props.modelValue, () => {
activeTab.value = props.modelValue
})
watch(activeTab, (val) => {
emit("update:modelValue", val);
})
provide("activeTab", activeTab); provide("activeTab", activeTab);
const slots = useSlots().default(); const slots = useSlots().default();

12
src/views/work/Todo.vue

@ -67,17 +67,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="办理状态"> <el-form-item label="办理状态">
<el-select <dict-select name="processingStatus" v-model="query.processingStatus" />
v-model="query.processingStatus"
clearable
>
<el-option
v-for="item in dict.processingStatus"
:key="item.id"
:label="item.dictLabel"
:value="item.dictLabel"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

Loading…
Cancel
Save