|
@@ -11,7 +11,7 @@ const formLabelAlign = reactive({
|
|
|
name: "",
|
|
|
region: "",
|
|
|
grade: "",
|
|
|
- compute: "",
|
|
|
+ compute: "1",
|
|
|
type: ""
|
|
|
});
|
|
|
const handleClose = (done: () => void) => {
|
|
@@ -104,24 +104,181 @@ const removeVoid = () => {
|
|
|
const count = item => {
|
|
|
try {
|
|
|
calculator.calculate(rolesList.value);
|
|
|
- // console.log(calculator.get()); // 输出结果
|
|
|
rolesList.num = calculator.get();
|
|
|
- // if (calculator.get()) {
|
|
|
- // } else {
|
|
|
- // rolesList.num = 0;
|
|
|
- // ElMessage({
|
|
|
- // message: "计算错误",
|
|
|
- // type: "warning"
|
|
|
- // });
|
|
|
- // }
|
|
|
} catch (error) {
|
|
|
- // ElMessage({
|
|
|
- // message: "计算错误",
|
|
|
- // type: "warning"
|
|
|
- // });
|
|
|
+ ElMessage({
|
|
|
+ message: "计算错误",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
console.log(error);
|
|
|
}
|
|
|
};
|
|
|
+// 多条件公式
|
|
|
+const manyChange = reactive({
|
|
|
+ newData: "",
|
|
|
+ dataList: [
|
|
|
+ {
|
|
|
+ compare: "0", // 比较符号
|
|
|
+ compareList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: ">"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "≥"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formula: "0",
|
|
|
+ formulaList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "数值"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "公式"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: "",
|
|
|
+ newData: "",
|
|
|
+ dataList: [
|
|
|
+ {
|
|
|
+ compare: "0", // 比较符号
|
|
|
+ compareList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: ">"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "≥"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formula: "0",
|
|
|
+ formulaList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "数值"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "公式"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: "",
|
|
|
+ grade: ""
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+});
|
|
|
+const deleteItem = index => {
|
|
|
+ if (manyChange.dataList.length > 1) {
|
|
|
+ manyChange.dataList.splice(index, 1);
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: "必须保留一条计算规则",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+const dataleListItem = (index, indexList) => {
|
|
|
+ if (manyChange.dataList[index].dataList.length > 1) {
|
|
|
+ manyChange.dataList[index].dataList.splice(indexList, 1);
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: "必须保留一条计算规则",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+const addNewItem = () => {
|
|
|
+ manyChange.dataList.push({
|
|
|
+ compare: "0", // 比较符号
|
|
|
+ compareList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: ">"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "≥"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formula: "0",
|
|
|
+ formulaList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "数值"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "公式"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: "",
|
|
|
+ newData: "",
|
|
|
+ dataList: [
|
|
|
+ {
|
|
|
+ compare: "0", // 比较符号
|
|
|
+ compareList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: ">"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "≥"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formula: "0",
|
|
|
+ formulaList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "数值"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "公式"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: "",
|
|
|
+ grade: ""
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+};
|
|
|
+const addItemDataList = (index: number, itemListValue: string) => {
|
|
|
+ console.log(index, itemListValue);
|
|
|
+ manyChange.dataList[index].dataList.push({
|
|
|
+ title: itemListValue,
|
|
|
+ compare: "0", // 比较符号
|
|
|
+ compareList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: ">"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "≥"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ formula: "0",
|
|
|
+ formulaList: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "数值"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "公式"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: "",
|
|
|
+ grade: ""
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -182,184 +339,339 @@ const count = item => {
|
|
|
label-position="top"
|
|
|
>
|
|
|
<div>
|
|
|
- <el-text>得分 =</el-text>
|
|
|
- <el-input
|
|
|
- v-model="rolesList.num"
|
|
|
- class="ml-2 mr-2"
|
|
|
- style="width: 240px"
|
|
|
- />
|
|
|
- <el-text>
|
|
|
- <el-button type="primary">公式验证</el-button>
|
|
|
- </el-text>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="w-[500px] compute h-64 mt-1 ml-12 flex justify-evenly items-center"
|
|
|
- style="user-select: none"
|
|
|
- >
|
|
|
- <div class="w-1/3 h-60 pl-1 bg-white rounded-md">
|
|
|
- <div class="w-[100%] text-xs mt-2">
|
|
|
- <div><el-text type="info">::变量</el-text></div>
|
|
|
- </div>
|
|
|
- <div v-for="item in rolesList.data" :key="item.id">
|
|
|
- <div
|
|
|
- :class="[
|
|
|
- 'cursor-pointer text-xs mt-1',
|
|
|
- { 'bg-blue-200': bgColor === item.id }
|
|
|
- ]"
|
|
|
- @click="lookRoles(item)"
|
|
|
- >
|
|
|
- <el-text class="">{{ item.name }}</el-text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <el-text>得分 =</el-text>
|
|
|
+ <el-input
|
|
|
+ v-model="rolesList.num"
|
|
|
+ class="ml-2 mr-2"
|
|
|
+ style="width: 240px"
|
|
|
+ />
|
|
|
+ <el-text>
|
|
|
+ <el-button type="primary">公式验证</el-button>
|
|
|
+ </el-text>
|
|
|
</div>
|
|
|
- <div class="w-3/5 ml-2 h-60 flex flex-col">
|
|
|
- <div class="w-[100%] text-xs h-24 bg-white rounded-md">
|
|
|
- <div class="p-1"><el-text>得分 = </el-text></div>
|
|
|
- <!-- style="height: 95px" -->
|
|
|
- <el-input
|
|
|
- v-model="rolesList.value"
|
|
|
- :rows="3"
|
|
|
- type="textarea"
|
|
|
- placeholder=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="w-[100%] h-32 mt-2 rounded-md flex flex-col">
|
|
|
- <div class="flex justify-between h-8">
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('1')"
|
|
|
- >
|
|
|
- 1
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class="w-[500px] compute h-64 mt-1 ml-12 flex justify-evenly items-center"
|
|
|
+ style="user-select: none"
|
|
|
+ >
|
|
|
+ <div class="w-1/3 h-60 pl-1 bg-white rounded-md">
|
|
|
+ <div class="w-[100%] text-xs mt-2">
|
|
|
+ <div><el-text type="info">::变量</el-text></div>
|
|
|
+ </div>
|
|
|
+ <div v-for="item in rolesList.data" :key="item.id">
|
|
|
<div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('2')"
|
|
|
+ :class="[
|
|
|
+ 'cursor-pointer text-xs mt-1',
|
|
|
+ { 'bg-blue-200': bgColor === item.id }
|
|
|
+ ]"
|
|
|
+ @click="lookRoles(item)"
|
|
|
>
|
|
|
- 2
|
|
|
+ <el-text class="">{{ item.name }}</el-text>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('3')"
|
|
|
- >
|
|
|
- 3
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="w-3/5 ml-2 h-60 flex flex-col">
|
|
|
+ <div class="w-[100%] text-xs h-24 bg-white rounded-md">
|
|
|
+ <div class="p-1"><el-text>得分 = </el-text></div>
|
|
|
+ <!-- style="height: 95px" -->
|
|
|
+ <el-input
|
|
|
+ v-model="rolesList.value"
|
|
|
+ :rows="3"
|
|
|
+ disabled
|
|
|
+ type="textarea"
|
|
|
+ placeholder='示例:"完成值" / "目标值" * 100'
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="w-[100%] h-32 mt-2 rounded-md flex flex-col">
|
|
|
+ <div class="flex justify-between h-8">
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('1')"
|
|
|
+ >
|
|
|
+ 1
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('2')"
|
|
|
+ >
|
|
|
+ 2
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('3')"
|
|
|
+ >
|
|
|
+ 3
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('+')"
|
|
|
+ >
|
|
|
+ +
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] text-white bg-orange-400 mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="remove"
|
|
|
+ >
|
|
|
+ x
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('+')"
|
|
|
- >
|
|
|
- +
|
|
|
+ <div class="flex justify-between h-8 mt-1">
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('4')"
|
|
|
+ >
|
|
|
+ 4
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('5')"
|
|
|
+ >
|
|
|
+ 5
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('6')"
|
|
|
+ >
|
|
|
+ 6
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('-')"
|
|
|
+ >
|
|
|
+ -
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="text-xs h-full w-[50px] text-white bg-orange-400 mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="removeVoid"
|
|
|
+ >
|
|
|
+ 清空
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] text-white bg-orange-400 mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="remove"
|
|
|
- >
|
|
|
- x
|
|
|
+ <div class="flex justify-between h-16 mt-1">
|
|
|
+ <div>
|
|
|
+ <div class="flex justify-between">
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('7')"
|
|
|
+ >
|
|
|
+ 7
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full ml-1 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('8')"
|
|
|
+ >
|
|
|
+ 8
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full ml-2 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('9')"
|
|
|
+ >
|
|
|
+ 9
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('*')"
|
|
|
+ >
|
|
|
+ *
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex mt-1 justify-between">
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('0')"
|
|
|
+ >
|
|
|
+ 0
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full ml-1 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('.')"
|
|
|
+ >
|
|
|
+ .
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full ml-2 w-[50px] bg-white mx-1 flex justify-between items-center rounded-lg cursor-pointer"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="w-1/2 h-full text-center border-r text-gray-100"
|
|
|
+ @click="countNumber('(')"
|
|
|
+ >
|
|
|
+ <span class="text-black"> (</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="w-1/2 h-full text-center"
|
|
|
+ @click="countNumber(')')"
|
|
|
+ >
|
|
|
+ )
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
+ @click="countNumber('/')"
|
|
|
+ >
|
|
|
+ /
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="h-full mr-1 w-[50px] text-white flex justify-center items-center rounded-lg cursor-pointer areYouOK"
|
|
|
+ @click="count"
|
|
|
+ >
|
|
|
+ 确认
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="flex justify-between h-8 mt-1">
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('4')"
|
|
|
- >
|
|
|
- 4
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('5')"
|
|
|
- >
|
|
|
- 5
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('6')"
|
|
|
- >
|
|
|
- 6
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-else label="公式设置">
|
|
|
+ <div class="w-full">
|
|
|
+ <div class="flex items-center">
|
|
|
+ <el-text>条件填 = </el-text>
|
|
|
+ <el-input
|
|
|
+ v-model="manyChange.newData"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 240px"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="w-full mt-2">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in manyChange.dataList"
|
|
|
+ :key="index"
|
|
|
+ class="flex items-center mb-4"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div class="flex">
|
|
|
+ <el-text class="w-[30px]" type="primary">
|
|
|
+ {{ index + 1 }}
|
|
|
+ </el-text>
|
|
|
+ <div class="mr-2">条件值</div>
|
|
|
+ <el-select
|
|
|
+ v-model="item.compare"
|
|
|
+ style="width: 60px"
|
|
|
+ placeholder=""
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="compareItem in item.compareList"
|
|
|
+ :key="compareItem.value"
|
|
|
+ :label="compareItem.label"
|
|
|
+ :value="compareItem.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="item.formula"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 80px"
|
|
|
+ placeholder=""
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="formulaItem in item.formulaList"
|
|
|
+ :key="formulaItem.value"
|
|
|
+ :label="formulaItem.label"
|
|
|
+ :value="formulaItem.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ v-model="item.value"
|
|
|
+ class="ml-2 mr-5"
|
|
|
+ style="width: 80px"
|
|
|
+ />
|
|
|
+ <el-text type="danger" @click="deleteItem(index)">
|
|
|
+ <el-icon><Delete /></el-icon>
|
|
|
+ </el-text>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('-')"
|
|
|
- >
|
|
|
- -
|
|
|
+ <div class="flex mt-2 ml-7">
|
|
|
+ <div class="mr-2">条件值{{ index + 1 }} =</div>
|
|
|
+ <el-input
|
|
|
+ v-model="item.value"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 240px"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="text-xs h-full w-[50px] text-white bg-orange-400 mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="removeVoid"
|
|
|
+ v-for="(itemList, indexList) in item.dataList"
|
|
|
+ :key="indexList"
|
|
|
>
|
|
|
- 清空
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex justify-between h-16 mt-1">
|
|
|
- <div>
|
|
|
- <div class="flex justify-between">
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('7')"
|
|
|
- >
|
|
|
- 7
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="h-full ml-1 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('8')"
|
|
|
- >
|
|
|
- 8
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="h-full ml-2 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('9')"
|
|
|
- >
|
|
|
- 9
|
|
|
+ <div class="flex mt-2 ml-7 items-center">
|
|
|
+ <div class="text_border">{{ indexList + 1 }}</div>
|
|
|
+ <!-- manyChange.dataList[index].dataList -->
|
|
|
+ <div class="w-[40px] ml-2">
|
|
|
+ {{ itemList?.title }}
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('*')"
|
|
|
+ <div class="mr-2">></div>
|
|
|
+ <div class="mr-2">条件值{{ indexList + 1 }}</div>
|
|
|
+ <el-select
|
|
|
+ v-model="itemList.compare"
|
|
|
+ style="width: 60px"
|
|
|
+ placeholder=""
|
|
|
>
|
|
|
- *
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex mt-1 justify-between">
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('0')"
|
|
|
+ <el-option
|
|
|
+ v-for="compareItem in itemList.compareList"
|
|
|
+ :key="compareItem.value"
|
|
|
+ :label="compareItem.label"
|
|
|
+ :value="compareItem.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="itemList.formula"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 80px"
|
|
|
+ placeholder=""
|
|
|
>
|
|
|
- 0
|
|
|
- </div>
|
|
|
+ <el-option
|
|
|
+ v-for="formulaItem in itemList.formulaList"
|
|
|
+ :key="formulaItem.value"
|
|
|
+ :label="formulaItem.label"
|
|
|
+ :value="formulaItem.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ v-model="itemList.value"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 80px"
|
|
|
+ />
|
|
|
<div
|
|
|
- class="h-full ml-1 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('.')"
|
|
|
+ class="w-[100px] ml-2 mr-2 flex justify-between items-center"
|
|
|
>
|
|
|
- .
|
|
|
+ <div>得分</div>
|
|
|
+ <div>=</div>
|
|
|
+ <el-input
|
|
|
+ v-model="itemList.grade"
|
|
|
+ class="ml-2"
|
|
|
+ style="width: 50px"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full ml-2 w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('()')"
|
|
|
+ <el-text
|
|
|
+ type="danger"
|
|
|
+ @click="dataleListItem(index, indexList)"
|
|
|
>
|
|
|
- ()
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="h-full w-[50px] bg-white mx-1 flex justify-center items-center rounded-lg cursor-pointer"
|
|
|
- @click="countNumber('/')"
|
|
|
+ <el-icon><Delete /></el-icon>
|
|
|
+ </el-text>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="indexList + 1 == item.dataList.length"
|
|
|
+ class="ml-7 mt-1 text-xs cursor-pointer"
|
|
|
+ >
|
|
|
+ <el-text
|
|
|
+ type="primary"
|
|
|
+ @click="addItemDataList(index, itemList.value)"
|
|
|
>
|
|
|
- /
|
|
|
- </div>
|
|
|
+ <el-icon><Plus /></el-icon>
|
|
|
+ 添加条件
|
|
|
+ </el-text>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="h-full mr-1 w-[50px] text-white flex justify-center items-center rounded-lg cursor-pointer areYouOK"
|
|
|
- @click="count"
|
|
|
- >
|
|
|
- 确认
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="mt-5 text-xs cursor-pointer">
|
|
|
+ <el-text type="primary" @click="addNewItem">
|
|
|
+ <el-icon><Plus /></el-icon>
|
|
|
+ 添加条件
|
|
|
+ </el-text>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-else label="公式设置">
|
|
|
- <div>
|
|
|
- <el-text>条件填 = </el-text
|
|
|
- ><el-input v-model="formLabelAlign.name" />
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -387,4 +699,17 @@ const count = item => {
|
|
|
.areYouOK {
|
|
|
background-color: #409eff;
|
|
|
}
|
|
|
+
|
|
|
+.text_border {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ // margin-top: 5px;
|
|
|
+ margin-right: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ border: 1px solid gray;
|
|
|
+ border-radius: 50%;
|
|
|
+}
|
|
|
</style>
|