|  | @@ -1,7 +1,7 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -	<div class="system-add-flag-container">
 | 
	
		
			
				|  |  | +	<div class="add-or-edit-assess">
 | 
	
		
			
				|  |  |  		<el-dialog :title="isEdit?'编辑标识项':'新建标识项'" v-model="isShowDialog" width="569px">
 | 
	
		
			
				|  |  | -			<el-form class="add-flag-container" ref="ruleTagRef" :rules="rules" :model="ruleForm" size="default" label-width="90px">
 | 
	
		
			
				|  |  | +			<el-form class="add-flag-container" ref="ruleTagRef" :rules="rules" :model="ruleForm" size="default" label-width="100px">
 | 
	
		
			
				|  |  |  				<el-row :gutter="35">
 | 
	
		
			
				|  |  |  					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 | 
	
		
			
				|  |  |  						<el-form-item label="标识" prop="name">
 | 
	
	
		
			
				|  | @@ -9,8 +9,8 @@
 | 
	
		
			
				|  |  |  						</el-form-item>
 | 
	
		
			
				|  |  |  					</el-col>
 | 
	
		
			
				|  |  |  					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 | 
	
		
			
				|  |  | -						<el-form-item label="名称" prop="title">
 | 
	
		
			
				|  |  | -							<el-input v-model="ruleForm.title" placeholder="请输入名称" clearable></el-input>
 | 
	
		
			
				|  |  | +						<el-form-item label="数据项名称" prop="title">
 | 
	
		
			
				|  |  | +							<el-input v-model="ruleForm.title" placeholder="请输入数据项名称" clearable></el-input>
 | 
	
		
			
				|  |  |  						</el-form-item>
 | 
	
		
			
				|  |  |  					</el-col>
 | 
	
		
			
				|  |  |  					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 | 
	
	
		
			
				|  | @@ -33,9 +33,9 @@
 | 
	
		
			
				|  |  |  						<div class="left-wrap">
 | 
	
		
			
				|  |  |  							<span class="symbol">*</span>
 | 
	
		
			
				|  |  |  							<span class="label">取值范围</span>
 | 
	
		
			
				|  |  | -							<el-input size="small" v-model="item.start_value" placeholder="请输入最小值" clearable></el-input>
 | 
	
		
			
				|  |  | +							<el-input size="small" v-model.number="item.start_value" placeholder="请输入最小值" clearable></el-input>
 | 
	
		
			
				|  |  |  							<span> ~ </span>
 | 
	
		
			
				|  |  | -							<el-input size="small" v-model="item.end_value" placeholder="请输入最大值" clearable></el-input>
 | 
	
		
			
				|  |  | +							<el-input size="small" v-model.number="item.end_value" placeholder="请输入最大值" clearable></el-input>
 | 
	
		
			
				|  |  |  						</div>
 | 
	
		
			
				|  |  |  						<div class="right-wrap">
 | 
	
		
			
				|  |  |  							<span class="symbol">*</span>
 | 
	
	
		
			
				|  | @@ -68,11 +68,6 @@ interface DeptData {
 | 
	
		
			
				|  |  |  	end_value: string;
 | 
	
		
			
				|  |  |  	base_value: string;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -// interface RangeData {
 | 
	
		
			
				|  |  | -// 	minVal: number | string;
 | 
	
		
			
				|  |  | -// 	maxVal: number | string;
 | 
	
		
			
				|  |  | -// 	score: number | string;
 | 
	
		
			
				|  |  | -// }
 | 
	
		
			
				|  |  |  interface UserState {
 | 
	
		
			
				|  |  |  	isShowDialog: boolean;
 | 
	
		
			
				|  |  |  	ruleForm: {
 | 
	
	
		
			
				|  | @@ -83,11 +78,10 @@ interface UserState {
 | 
	
		
			
				|  |  |  	};
 | 
	
		
			
				|  |  |  	index: any;
 | 
	
		
			
				|  |  |  	isEdit: Boolean;
 | 
	
		
			
				|  |  | -	// deptData: Array<DeptData>;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  | -	name: 'systemAddUser',
 | 
	
		
			
				|  |  | +	name: 'AddOrEditAssess',
 | 
	
		
			
				|  |  |  	setup(prop, { emit }) {
 | 
	
		
			
				|  |  |  		const state = reactive<UserState>({
 | 
	
		
			
				|  |  |  			isShowDialog: false,
 | 
	
	
		
			
				|  | @@ -106,7 +100,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  				{ required: true, message: '请输入标识', trigger: 'blur' },
 | 
	
		
			
				|  |  |  			],
 | 
	
		
			
				|  |  |  			title: [
 | 
	
		
			
				|  |  | -				{ required: true, message: '请输入名称', trigger: 'blur' },
 | 
	
		
			
				|  |  | +				{ required: true, message: '请输入数据项名称', trigger: 'blur' },
 | 
	
		
			
				|  |  |  			],
 | 
	
		
			
				|  |  |  			weight: [
 | 
	
		
			
				|  |  |  				{ required: true, message: '请输入权重', trigger: 'blur' },
 | 
	
	
		
			
				|  | @@ -138,11 +132,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  		const onCancel = () => {
 | 
	
		
			
				|  |  |  			closeDialog();
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  | -		// // 新增
 | 
	
		
			
				|  |  | -		// const onSubmit = () => {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -		// };
 | 
	
		
			
				|  |  |  		// 保存数据
 | 
	
		
			
				|  |  |  		const onSubmit = async (formEl: FormInstance | undefined) => {
 | 
	
		
			
				|  |  |  			if (!formEl) return
 | 
	
	
		
			
				|  | @@ -155,46 +144,16 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  							ElMessage.error('请完善表单');
 | 
	
		
			
				|  |  |  							return
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  | +						if(start_value >= end_value) {
 | 
	
		
			
				|  |  | +							ElMessage.error('最大值最小值范围设置错误');
 | 
	
		
			
				|  |  | +							return
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  					emit('handleChange', state.ruleForm, state.index, state.isEdit)
 | 
	
		
			
				|  |  |  					closeDialog();
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			})
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		// 初始化组织数据
 | 
	
		
			
				|  |  | -		// const initTableData = () => {
 | 
	
		
			
				|  |  | -		// 	state.deptData.push({
 | 
	
		
			
				|  |  | -		// 		deptName: 'vueNextAdmin',
 | 
	
		
			
				|  |  | -		// 		createTime: new Date().toLocaleString(),
 | 
	
		
			
				|  |  | -		// 		status: true,
 | 
	
		
			
				|  |  | -		// 		sort: Math.random(),
 | 
	
		
			
				|  |  | -		// 		describe: '顶级组织',
 | 
	
		
			
				|  |  | -		// 		id: Math.random(),
 | 
	
		
			
				|  |  | -		// 		children: [
 | 
	
		
			
				|  |  | -		// 			{
 | 
	
		
			
				|  |  | -		// 				deptName: 'IT外包服务',
 | 
	
		
			
				|  |  | -		// 				createTime: new Date().toLocaleString(),
 | 
	
		
			
				|  |  | -		// 				status: true,
 | 
	
		
			
				|  |  | -		// 				sort: Math.random(),
 | 
	
		
			
				|  |  | -		// 				describe: '总部',
 | 
	
		
			
				|  |  | -		// 				id: Math.random(),
 | 
	
		
			
				|  |  | -		// 			},
 | 
	
		
			
				|  |  | -		// 			{
 | 
	
		
			
				|  |  | -		// 				deptName: '资本控股',
 | 
	
		
			
				|  |  | -		// 				createTime: new Date().toLocaleString(),
 | 
	
		
			
				|  |  | -		// 				status: true,
 | 
	
		
			
				|  |  | -		// 				sort: Math.random(),
 | 
	
		
			
				|  |  | -		// 				describe: '分部',
 | 
	
		
			
				|  |  | -		// 				id: Math.random(),
 | 
	
		
			
				|  |  | -		// 			},
 | 
	
		
			
				|  |  | -		// 		],
 | 
	
		
			
				|  |  | -		// 	});
 | 
	
		
			
				|  |  | -		// 	state.ruleForm.list = [{
 | 
	
		
			
				|  |  | -		// 		minVal: 10,
 | 
	
		
			
				|  |  | -		// 		maxVal: 100,
 | 
	
		
			
				|  |  | -		// 		score: 90
 | 
	
		
			
				|  |  | -		// 	}]
 | 
	
		
			
				|  |  | -		// };
 | 
	
		
			
				|  |  |  		const addRange = () => {
 | 
	
		
			
				|  |  |  			if(!state.ruleForm.ranges.length) {
 | 
	
		
			
				|  |  |  				state.ruleForm.ranges.push({
 | 
	
	
		
			
				|  | @@ -210,6 +169,10 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  				ElMessage.error('请完善表单');
 | 
	
		
			
				|  |  |  				return
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | +			if(start_value >= end_value) {
 | 
	
		
			
				|  |  | +				ElMessage.error('最大值最小值范围设置错误');
 | 
	
		
			
				|  |  | +				return
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |  			state.ruleForm.ranges.push({
 | 
	
		
			
				|  |  |  				start_value: '',
 | 
	
		
			
				|  |  |  				end_value: '',
 | 
	
	
		
			
				|  | @@ -217,22 +180,8 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  			})
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  |  		const deleteRange = (index: number) => {
 | 
	
		
			
				|  |  | -			state.ruleForm.ranges.splice(index, 1)
 | 
	
		
			
				|  |  | -			// const { minVal, maxVal, score } = item
 | 
	
		
			
				|  |  | -			// if(!minVal || !maxVal || !score.toString()) {
 | 
	
		
			
				|  |  | -			// 	ElMessage.error('请完善表单');
 | 
	
		
			
				|  |  | -			// 	return
 | 
	
		
			
				|  |  | -			// }
 | 
	
		
			
				|  |  | -			// state.ruleForm.list.push({
 | 
	
		
			
				|  |  | -			// 	minVal: '',
 | 
	
		
			
				|  |  | -			// 	maxVal: '',
 | 
	
		
			
				|  |  | -			// 	score: ''
 | 
	
		
			
				|  |  | -			// })
 | 
	
		
			
				|  |  | +			state.ruleForm.ranges.splice(index, 1);
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  | -		// 页面加载时
 | 
	
		
			
				|  |  | -		onMounted(() => {
 | 
	
		
			
				|  |  | -			// initTableData();
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  |  		return {
 | 
	
		
			
				|  |  |  			rules,
 | 
	
		
			
				|  |  |  			ruleTagRef,
 | 
	
	
		
			
				|  | @@ -260,7 +209,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  	border-bottom: 1px solid var(--el-border-color);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  .add-value-range {
 | 
	
		
			
				|  |  | -	// background-color: pink;
 | 
	
		
			
				|  |  |  	padding: 10px 0;
 | 
	
		
			
				|  |  |  	.header {
 | 
	
		
			
				|  |  |  		display: flex;
 |