| | |
| | | :inline="true" |
| | | label-width="68px" |
| | | > --> |
| | | <!-- <el-form-item label="病种名称" prop="bingzhong"> |
| | | <!-- <el-form-item label="病种名称" prop="bingzhong"> |
| | | <el-input |
| | | v-model="queryParams.bingzhong" |
| | | placeholder="请输入简称" |
| | |
| | | >搜索</el-button |
| | | > |
| | | </el-form-item> --> |
| | | <!-- <el-form-item> |
| | | <!-- <el-form-item> |
| | | <h3 >{{ queryParams.proName || '暂无项目名称' }}</h3> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item> |
| | | <!-- <el-form-item> |
| | | <h3 style="margin-left: 160px">已选项目</h3> |
| | | </el-form-item> --> |
| | | <!-- </el-form> --> |
| | | <h2 style="text-align: center; margin-top: -30px"> |
| | | {{ queryParams.proName || "暂无项目名称" }} |
| | | </h2> |
| | | <h2 style="text-align: center;margin-top: -30px;">{{ queryParams.proName || '暂无项目名称' }}</h2> |
| | | <div style="display: flex; width: 100%"> |
| | | <div style="width: 50%; margin-right: 40px"> |
| | | <el-table |
| | | :data="dataList" |
| | | ref="multipleTable" |
| | | v-loading="loading" |
| | | row-key="aid" |
| | | @selection-change="handleSelectionChange" |
| | | border |
| | | height="420px" |
| | |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | proSex: { |
| | | type: String, |
| | | default: "2" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // 弹出层标题 |
| | | title: "", |
| | | yxbx: "", |
| | | proName: "", |
| | | proName:'', |
| | | // lastDesc: "", |
| | | total: 0, |
| | | dataList: [], |
| | |
| | | queryParams: { |
| | | bingzhong: "", |
| | | bzPinyin: "", |
| | | proId: "", |
| | | proSex: "2", |
| | | proId:"", |
| | | // proName:"", |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | |
| | | if (newVal && newVal.length > 0) { |
| | | const firstProject = newVal[0]; // 你也可以遍历所有项目,看你业务需求 |
| | | this.queryParams.proId = firstProject.proId; // 假设项目中叫 id |
| | | this.proName = firstProject.proName; |
| | | // this.queryParams.proName = firstProject.proName; |
| | | this.proName = firstProject.proName |
| | | } |
| | | }, |
| | | }, |
| | | proSex: { |
| | | handler(newVal) { |
| | | this.queryParams.proSex = newVal; |
| | | this.getList(); |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | |
| | | created() { |
| | | this.queryParams.proSex = this.proSex; |
| | | this.getList(); |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | async getList() { |
| | | try { |
| | |
| | | if (!this.fList?.rulesList?.length) return; |
| | | |
| | | await this.$nextTick(); |
| | | // 先清除所有选择 |
| | | this.$refs.multipleTable?.clearSelection(); |
| | | // 再进行选择 |
| | | this.dataList.forEach((item) => { |
| | | const shouldSelect = this.fList.rulesList.some( |
| | | (rule) => rule.aid === item.aid |
| | |
| | | }, |
| | | |
| | | handleSelectionChange(selection) { |
| | | // this.list = selection; |
| | | this.list = [...selection]; |
| | | console.log('Selection changed:', selection); |
| | | this.list = [...selection]; // 使用展开运算符创建新数组 |
| | | this.updateFormContent(selection); |
| | | }, |
| | | |
| | |
| | | this.form.desc = ""; |
| | | this.form.jcsj = ""; |
| | | |
| | | // 使用map和join替代forEach和字符串拼接 |
| | | // 只有在有选中项时才进行拼接 |
| | | if (selection.length > 0) { |
| | | // 使用map和join替代forEach和字符串拼接 |
| | | this.form.desc = selection |
| | | .map((item) => item.bingzhong || item.ruleStr) |
| | | .filter(Boolean) |