|
@@ -3,15 +3,15 @@
|
|
|
<!-- 第一层 -->
|
|
|
<div class="data-box">
|
|
|
<el-select
|
|
|
+ v-model="item.ynType"
|
|
|
placeholder="选择类型"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
- v-model="item.ynType"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in type"
|
|
|
- :label="d.dictLabel"
|
|
|
:key="d.dictValue"
|
|
|
+ :label="d.dictLabel"
|
|
|
:value="d.dictValue"
|
|
|
>
|
|
|
{{ d.dictLabel }}
|
|
@@ -19,6 +19,7 @@
|
|
|
</el-select>
|
|
|
|
|
|
<CCITTreeSelect
|
|
|
+ v-model="item.mdType"
|
|
|
class="tree-select"
|
|
|
width="200"
|
|
|
:options="ruleType"
|
|
@@ -28,37 +29,36 @@
|
|
|
children: 'children', // 子级字段名
|
|
|
}"
|
|
|
size="mini"
|
|
|
- v-model="item.mdType"
|
|
|
@change="mdTypeChange($event)"
|
|
|
- ></CCITTreeSelect>
|
|
|
+ />
|
|
|
|
|
|
<roninSelect
|
|
|
- v-model="item.mdCode"
|
|
|
v-if="!isSpecial"
|
|
|
+ v-model="item.mdCode"
|
|
|
class="select"
|
|
|
placeholder="请选择"
|
|
|
- :dataList="scalesOptions"
|
|
|
+ :data-list="scalesOptions"
|
|
|
:keeps="30"
|
|
|
- :estimateSize="32"
|
|
|
- @ListChange="onListChange"
|
|
|
- @change="handleChangeScales($event)"
|
|
|
+ :estimate-size="32"
|
|
|
:page="page"
|
|
|
:total="total"
|
|
|
- :moreDataType="moreDataType"
|
|
|
- ></roninSelect>
|
|
|
+ :more-data-type="moreDataType"
|
|
|
+ @ListChange="onListChange"
|
|
|
+ @change="handleChangeScales($event)"
|
|
|
+ />
|
|
|
|
|
|
<el-select
|
|
|
- placeholder="选择结果分类"
|
|
|
- @change="resultTypeChange"
|
|
|
v-if="resultType && resultType.length > 0"
|
|
|
+ v-model="item.op"
|
|
|
+ placeholder="选择结果分类"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
- v-model="item.op"
|
|
|
+ @change="resultTypeChange"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in resultType"
|
|
|
- :label="d.name"
|
|
|
:key="d.key"
|
|
|
+ :label="d.name"
|
|
|
:value="d.key"
|
|
|
>
|
|
|
{{ d.name }}
|
|
@@ -67,19 +67,18 @@
|
|
|
|
|
|
<!-- 二级操作符 -->
|
|
|
<el-select
|
|
|
+ v-if="item.op == 'result_narrate'"
|
|
|
+ v-model="item.opChild"
|
|
|
placeholder="二级操作符"
|
|
|
class="select"
|
|
|
- v-if="item.op == 'result_narrate'"
|
|
|
size="mini"
|
|
|
- v-model="item.opChild"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in opOptions"
|
|
|
- :label="d.label"
|
|
|
:key="d.value"
|
|
|
+ :label="d.label"
|
|
|
:value="d.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
|
|
|
<!-- 区间 -->
|
|
@@ -89,14 +88,14 @@
|
|
|
style="width: 90px"
|
|
|
size="mini"
|
|
|
placeholder="左区间"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
<span> - </span>
|
|
|
<el-input
|
|
|
v-model="item.ovalTwo"
|
|
|
style="width: 90px"
|
|
|
size="mini"
|
|
|
placeholder="右区间"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
</span>
|
|
|
<!-- 上升 下降 -->
|
|
|
<span v-if="(item.op == 'rise' || item.op == 'decline')&& !item.dateType">
|
|
@@ -120,7 +119,7 @@
|
|
|
item.op == 'ge' ||
|
|
|
item.op == 'lt' ||
|
|
|
item.op == 'le') &&
|
|
|
- !item.dateType
|
|
|
+ !item.dateType
|
|
|
"
|
|
|
>
|
|
|
<el-input
|
|
@@ -128,12 +127,12 @@
|
|
|
v-model="item.oval"
|
|
|
style="width: 90px"
|
|
|
size="mini"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
|
|
|
<el-input-number
|
|
|
- v-model="item.oval"
|
|
|
v-if="item.rawType == 'i' || item.rawType == 'd'"
|
|
|
- ></el-input-number>
|
|
|
+ v-model="item.oval"
|
|
|
+ />
|
|
|
|
|
|
<el-date-picker
|
|
|
v-if="item.rawType == 'dt'"
|
|
@@ -143,22 +142,21 @@
|
|
|
format="yyyy-MM-dd"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
</span>
|
|
|
|
|
|
<!-- 操作符 字典下拉 -->
|
|
|
<span v-if="dataType == 'dict'">
|
|
|
<el-select
|
|
|
+ v-model="item.oval"
|
|
|
placeholder="选择值字典"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
- v-model="item.oval"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in dict"
|
|
|
- :label="d.dictLabel"
|
|
|
:key="d.dictValue"
|
|
|
+ :label="d.dictLabel"
|
|
|
:value="d.dictValue"
|
|
|
>
|
|
|
{{ d.dictLabel }}
|
|
@@ -169,9 +167,10 @@
|
|
|
<!-- 操作符 叙述结果 -->
|
|
|
<span v-if="dataType == 'standard'">
|
|
|
<el-select
|
|
|
+ v-if="item.op"
|
|
|
+ v-model="item.ovalMany"
|
|
|
placeholder="选择值叙述"
|
|
|
class="select ronin-select"
|
|
|
- v-if="item.op"
|
|
|
multiple
|
|
|
size="mini"
|
|
|
filterable
|
|
@@ -180,40 +179,38 @@
|
|
|
return onSelectChange(val, item);
|
|
|
}
|
|
|
"
|
|
|
- v-model="item.ovalMany"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in dict"
|
|
|
- :label="d.name"
|
|
|
:key="d.id"
|
|
|
+ :label="d.name"
|
|
|
:value="d.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</span>
|
|
|
|
|
|
<!-- 操作符 输入框 -->
|
|
|
<span v-if="dataType == 'none'">
|
|
|
-
|
|
|
+
|
|
|
<el-input
|
|
|
v-if="dataTypeTop == 's' || dataTypeTop == 't'"
|
|
|
v-model="item.oval"
|
|
|
style="width: 90px"
|
|
|
size="mini"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
|
|
|
<el-input-number
|
|
|
+ v-if="dataTypeTop == 'd'"
|
|
|
v-model="item.oval"
|
|
|
controls-position="right"
|
|
|
- v-if="dataTypeTop == 'd'"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
<el-input-number
|
|
|
+ v-if="dataTypeTop == 'i'"
|
|
|
v-model="item.oval"
|
|
|
controls-position="right"
|
|
|
:step="1"
|
|
|
step-strictly
|
|
|
- v-if="dataTypeTop == 'i'"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
|
|
|
<el-date-picker
|
|
|
v-if="dataTypeTop == 'dt'"
|
|
@@ -223,20 +220,19 @@
|
|
|
format="yyyy-MM-dd"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
|
|
|
<el-select
|
|
|
- placeholder="选择值字典"
|
|
|
v-if="dataTypeTop == 'dict'"
|
|
|
+ v-model="item.oval"
|
|
|
+ placeholder="选择值字典"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
- v-model="item.oval"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in dict"
|
|
|
- :label="d.dictLabel"
|
|
|
:key="d.dictValue"
|
|
|
+ :label="d.dictLabel"
|
|
|
:value="d.dictValue"
|
|
|
>
|
|
|
{{ d.dictLabel }}
|
|
@@ -246,71 +242,72 @@
|
|
|
|
|
|
<a
|
|
|
v-if="item.restriction != 'Y'"
|
|
|
- @click="onClickType(true)"
|
|
|
class="add-name"
|
|
|
- >添加条件限制</a
|
|
|
- >
|
|
|
+ @click="onClickType(true)"
|
|
|
+ >添加条件限制</a>
|
|
|
|
|
|
- <a v-else class="add-name span-name-del" @click="onClickType(false)"
|
|
|
- >删除数据条件</a
|
|
|
- >
|
|
|
+ <a
|
|
|
+ v-else
|
|
|
+ class="add-name span-name-del"
|
|
|
+ @click="onClickType(false)"
|
|
|
+ >删除数据条件</a>
|
|
|
</div>
|
|
|
<!-- 第二层 -->
|
|
|
<div v-if="item.restriction == 'Y'" class="more">
|
|
|
<span class="span-name">数据有效时间方式:</span>
|
|
|
<el-select
|
|
|
+ v-model="item.dtRangeType"
|
|
|
placeholder="时间类型"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
clearable
|
|
|
- v-model="item.dtRangeType"
|
|
|
@change="onDateTypeChange"
|
|
|
>
|
|
|
- <el-option label="按固定日期" value="absolute"></el-option>
|
|
|
- <el-option label="数据时间范围" value="relative"></el-option>
|
|
|
+ <el-option label="按固定日期" value="absolute" />
|
|
|
+ <el-option label="数据时间范围" value="relative" />
|
|
|
</el-select>
|
|
|
<span v-if="item.dtRangeType == 'relative'">
|
|
|
<span class="span-name">数据有效范围从前 </span>
|
|
|
|
|
|
<el-input-number
|
|
|
+ v-model="item.dtLimitStart"
|
|
|
size="mini"
|
|
|
clearable
|
|
|
controls-position="right"
|
|
|
class="select"
|
|
|
- v-model="item.dtLimitStart"
|
|
|
:min="0"
|
|
|
:max="1000"
|
|
|
style="width: 120px"
|
|
|
label="选择时间"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
|
|
|
<span class="span-name">至</span>
|
|
|
|
|
|
<el-input-number
|
|
|
+ v-model="item.dtLimitEnd"
|
|
|
size="mini"
|
|
|
clearable
|
|
|
controls-position="right"
|
|
|
class="select"
|
|
|
- v-model="item.dtLimitEnd"
|
|
|
:min="0"
|
|
|
:max="1000"
|
|
|
style="width: 120px"
|
|
|
label="选择时间"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
|
|
|
<el-select
|
|
|
+ v-model="item.dtLimitUnit"
|
|
|
placeholder="时间单位"
|
|
|
class="select"
|
|
|
size="mini"
|
|
|
style="width: 80px"
|
|
|
- v-model="item.dtLimitUnit"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="d in timeType"
|
|
|
- :label="d.dictLabel"
|
|
|
:key="d.dictValue"
|
|
|
+ :label="d.dictLabel"
|
|
|
:value="d.dictValue"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</span>
|
|
|
|
|
@@ -326,8 +323,7 @@
|
|
|
clearable
|
|
|
:picker-options="pickerOptionsStar"
|
|
|
@focus="checkStarttimeStar"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
|
|
|
<span class="span-name">结束时间:</span>
|
|
|
<el-date-picker
|
|
@@ -336,15 +332,14 @@
|
|
|
class="select"
|
|
|
format="yyyy-MM-dd"
|
|
|
:picker-options="pickerOptions"
|
|
|
- @focus="checkStarttime"
|
|
|
clearable
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ @focus="checkStarttime"
|
|
|
+ />
|
|
|
</span>
|
|
|
|
|
|
- <br />
|
|
|
+ <br>
|
|
|
<span class="span-name">任意条件次数:</span>
|
|
|
<!-- <el-select
|
|
|
placeholder="次数"
|
|
@@ -362,14 +357,14 @@
|
|
|
</el-select> -->
|
|
|
|
|
|
<el-input-number
|
|
|
+ v-model="item.rytjNum"
|
|
|
size="mini"
|
|
|
controls-position="right"
|
|
|
class="select"
|
|
|
- v-model="item.rytjNum"
|
|
|
:min="1"
|
|
|
:max="1000"
|
|
|
label="次数"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
|
|
|
<span class="span-name">连续满足几次:</span>
|
|
|
|
|
@@ -389,14 +384,14 @@
|
|
|
>
|
|
|
</el-select> -->
|
|
|
<el-input-number
|
|
|
+ v-model="item.lxtjNum"
|
|
|
size="mini"
|
|
|
controls-position="right"
|
|
|
class="select"
|
|
|
- v-model="item.lxtjNum"
|
|
|
:min="1"
|
|
|
:max="1000"
|
|
|
label="次数"
|
|
|
- ></el-input-number>
|
|
|
+ />
|
|
|
|
|
|
<span class="span-name">数据来源科室:</span>
|
|
|
|
|
@@ -410,13 +405,13 @@
|
|
|
<el-option value="N" label="未就诊科室"></el-option>
|
|
|
</el-select> -->
|
|
|
<CCITTreeSelect
|
|
|
+ v-model="item.deptCodes"
|
|
|
class="tree-select"
|
|
|
:options="treeData"
|
|
|
size="mini"
|
|
|
multiple
|
|
|
- v-model="item.deptCodes"
|
|
|
@change="deptChange"
|
|
|
- ></CCITTreeSelect>
|
|
|
+ />
|
|
|
|
|
|
<!-- <span class="span-name">部门类型:</span> -->
|
|
|
</div>
|
|
@@ -438,194 +433,194 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listByType, dataPageType } from "@/api/rule/index";
|
|
|
-import { getDict, getDicts } from "@/utils/index";
|
|
|
-import roninSelect from "@/components/RONIN-select/index.vue";
|
|
|
-let that;
|
|
|
+import { listByType, dataPageType } from '@/api/rule/index'
|
|
|
+import { getDict, getDicts } from '@/utils/index'
|
|
|
+import roninSelect from '@/components/RONIN-select/index.vue'
|
|
|
+let that
|
|
|
export default {
|
|
|
components: { roninSelect },
|
|
|
- props: ["item", "treeData", "childData"],
|
|
|
+ filters: {
|
|
|
+ filterTimeType(e) {
|
|
|
+ let name = e
|
|
|
+ if (that && that.timeType && that.timeType.length > 0) {
|
|
|
+ that.timeType.forEach((item) => {
|
|
|
+ if (item.dictValue == e) {
|
|
|
+ name = item.dictLabel
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ return name
|
|
|
+ }
|
|
|
+ },
|
|
|
+ props: ['item', 'treeData', 'childData'],
|
|
|
data() {
|
|
|
return {
|
|
|
scalesOptions: [],
|
|
|
opOptions: [
|
|
|
{
|
|
|
- label: "包含(所有)",
|
|
|
- value: "contain",
|
|
|
+ label: '包含(所有)',
|
|
|
+ value: 'contain'
|
|
|
},
|
|
|
{
|
|
|
- label: "不包含(所有)",
|
|
|
- value: "not_contain",
|
|
|
+ label: '不包含(所有)',
|
|
|
+ value: 'not_contain'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- label: "包含(任一)",
|
|
|
- value: "contain_any",
|
|
|
+ label: '包含(任一)',
|
|
|
+ value: 'contain_any'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- label: "不包含(任一)",
|
|
|
- value: "not_contain_any",
|
|
|
- },
|
|
|
+ label: '不包含(任一)',
|
|
|
+ value: 'not_contain_any'
|
|
|
+ }
|
|
|
],
|
|
|
|
|
|
type: [],
|
|
|
- sampleType: [], //样本类型
|
|
|
+ sampleType: [], // 样本类型
|
|
|
resultType: [],
|
|
|
|
|
|
- radio: "1",
|
|
|
- dict: [], //字典
|
|
|
+ radio: '1',
|
|
|
+ dict: [], // 字典
|
|
|
isMore: false,
|
|
|
dept: [],
|
|
|
timeType: [],
|
|
|
ruleType: [],
|
|
|
- dataTypeTop: "", //标准数据的类型
|
|
|
- dataType: "", //操作符 的dataType (dict字典,standard标准业务码表,none输入 )
|
|
|
- standardVal: [], //叙述结果下拉
|
|
|
+ dataTypeTop: '', // 标准数据的类型
|
|
|
+ dataType: '', // 操作符 的dataType (dict字典,standard标准业务码表,none输入 )
|
|
|
+ standardVal: [], // 叙述结果下拉
|
|
|
dateTime: [],
|
|
|
pickerOptions: {},
|
|
|
pickerOptionsStar: {},
|
|
|
isSpecial: false,
|
|
|
page: 1,
|
|
|
total: 0,
|
|
|
- moreDataType: "", //加载更多参数
|
|
|
- };
|
|
|
- },
|
|
|
- filters: {
|
|
|
- filterTimeType(e) {
|
|
|
- let name = e;
|
|
|
- if (that && that.timeType && that.timeType.length > 0) {
|
|
|
- that.timeType.forEach((item) => {
|
|
|
- if (item.dictValue == e) {
|
|
|
- name = item.dictLabel;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- return name;
|
|
|
- },
|
|
|
+ moreDataType: '' // 加载更多参数
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
childData: {
|
|
|
- handler: function (val) {
|
|
|
- this.upDateData();
|
|
|
+ handler: function(val) {
|
|
|
+ this.upDateData()
|
|
|
},
|
|
|
deep: true,
|
|
|
- immediate: true,
|
|
|
- },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- that = this;
|
|
|
- this.upDateData();
|
|
|
- let obj = {};
|
|
|
+ that = this
|
|
|
+ this.upDateData()
|
|
|
+ const obj = {}
|
|
|
},
|
|
|
methods: {
|
|
|
checkStarttimeStar() {
|
|
|
- let startime = this.item.dtLimitEnd; // 取到起始时间选中的值
|
|
|
+ const startime = this.item.dtLimitEnd // 取到起始时间选中的值
|
|
|
this.pickerOptionsStar = Object.assign({}, this.pickerOptionsStar, {
|
|
|
disabledDate: (time) => {
|
|
|
- const today = new Date().toLocaleDateString(); // 当天时间转换成日期格式
|
|
|
- //禁用这一天的日期 如需禁用之前之后,可把=== 替换成 > 或 <
|
|
|
- let disable = time === new Date(today);
|
|
|
- disable = disable || time.getTime() > new Date(startime).getTime(); //(减去一天-8.64e7)
|
|
|
- return disable;
|
|
|
- },
|
|
|
- });
|
|
|
+ const today = new Date().toLocaleDateString() // 当天时间转换成日期格式
|
|
|
+ // 禁用这一天的日期 如需禁用之前之后,可把=== 替换成 > 或 <
|
|
|
+ let disable = time === new Date(today)
|
|
|
+ disable = disable || time.getTime() > new Date(startime).getTime() // (减去一天-8.64e7)
|
|
|
+ return disable
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
checkStarttime() {
|
|
|
- let startime = this.item.dtLimitStart; // 取到起始时间选中的值
|
|
|
+ const startime = this.item.dtLimitStart // 取到起始时间选中的值
|
|
|
this.pickerOptions = Object.assign({}, this.pickerOptions, {
|
|
|
disabledDate: (time) => {
|
|
|
- const today = new Date().toLocaleDateString(); // 当天时间转换成日期格式
|
|
|
- //禁用这一天的日期 如需禁用之前之后,可把=== 替换成 > 或 <
|
|
|
- let disable = time === new Date(today);
|
|
|
- disable = disable || time.getTime() < new Date(startime).getTime(); //(减去一天-8.64e7)
|
|
|
- return disable;
|
|
|
- },
|
|
|
- });
|
|
|
+ const today = new Date().toLocaleDateString() // 当天时间转换成日期格式
|
|
|
+ // 禁用这一天的日期 如需禁用之前之后,可把=== 替换成 > 或 <
|
|
|
+ let disable = time === new Date(today)
|
|
|
+ disable = disable || time.getTime() < new Date(startime).getTime() // (减去一天-8.64e7)
|
|
|
+ return disable
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- //选择叙述结果
|
|
|
+ // 选择叙述结果
|
|
|
standardChange(e) {
|
|
|
- let val = "";
|
|
|
+ let val = ''
|
|
|
e.forEach((item) => {
|
|
|
- val += item + ",";
|
|
|
- });
|
|
|
- val = val.slice(0, val.length - 1);
|
|
|
- this.item.ovalMany = val;
|
|
|
+ val += item + ','
|
|
|
+ })
|
|
|
+ val = val.slice(0, val.length - 1)
|
|
|
+ this.item.ovalMany = val
|
|
|
},
|
|
|
onDateTypeChange() {
|
|
|
- this.item.dtLimitStart = "";
|
|
|
- this.item.dtLimitEnd = "";
|
|
|
- this.dateTime = [];
|
|
|
+ this.item.dtLimitStart = ''
|
|
|
+ this.item.dtLimitEnd = ''
|
|
|
+ this.dateTime = []
|
|
|
},
|
|
|
onDatePickChange(e) {
|
|
|
- this.item.dtLimitStart = e[0];
|
|
|
- this.item.dtLimitEnd = e[1];
|
|
|
+ this.item.dtLimitStart = e[0]
|
|
|
+ this.item.dtLimitEnd = e[1]
|
|
|
},
|
|
|
upDateData() {
|
|
|
if (this.childData.dict) {
|
|
|
- this.ruleType = this.childData.dict["rule_prop_type"] || [];
|
|
|
- this.type = this.childData.dict["role_condition_type"] || [];
|
|
|
- this.timeType = this.childData.dict["date_limit_unit"] || [];
|
|
|
+ this.ruleType = this.childData.dict['rule_prop_type'] || []
|
|
|
+ this.type = this.childData.dict['role_condition_type'] || []
|
|
|
+ this.timeType = this.childData.dict['date_limit_unit'] || []
|
|
|
}
|
|
|
},
|
|
|
reset() {
|
|
|
- this.dateTime = [];
|
|
|
- this.dataType = "";
|
|
|
+ this.dateTime = []
|
|
|
+ this.dataType = ''
|
|
|
},
|
|
|
async init() {
|
|
|
- this.reset();
|
|
|
+ this.reset()
|
|
|
// 初始化时间
|
|
|
- if (this.item.dtRangeType == "absolute" && this.item.dtLimitStart) {
|
|
|
- this.dateTime = [this.item.dtLimitStart, this.item.dtLimitEnd];
|
|
|
+ if (this.item.dtRangeType == 'absolute' && this.item.dtLimitStart) {
|
|
|
+ this.dateTime = [this.item.dtLimitStart, this.item.dtLimitEnd]
|
|
|
}
|
|
|
if (this.item.mdType && this.childData.type[this.item.mdType]) {
|
|
|
- this.scalesOptions = this.childData.type[this.item.mdType].list;
|
|
|
- this.moreDataType = this.item.mdType;
|
|
|
- this.page = 1;
|
|
|
- this.total = this.childData.type[this.item.mdType].total;
|
|
|
- this.isSpecialType();
|
|
|
+ this.scalesOptions = this.childData.type[this.item.mdType].list
|
|
|
+ this.moreDataType = this.item.mdType
|
|
|
+ this.page = 1
|
|
|
+ this.total = this.childData.type[this.item.mdType].total
|
|
|
+ this.isSpecialType()
|
|
|
}
|
|
|
|
|
|
if (this.item.mdCode) {
|
|
|
- this.handleChangeScales(this.item.mdCode, true);
|
|
|
+ this.handleChangeScales(this.item.mdCode, true)
|
|
|
}
|
|
|
|
|
|
if (this.item.op) {
|
|
|
- this.resultTypeChange(this.item.op, true,this.item);
|
|
|
+ this.resultTypeChange(this.item.op, true, this.item)
|
|
|
}
|
|
|
},
|
|
|
mdTypeChange(e) {
|
|
|
- this.item.mdCode = "";
|
|
|
- this.item.sampleCode = "";
|
|
|
- this.item.op = "";
|
|
|
- this.item.oval = "";
|
|
|
- this.item.ovalTwo = "";
|
|
|
- this.item.ovalMany = [];
|
|
|
- this.item.opChild = "";
|
|
|
- this.dataType = "";
|
|
|
-
|
|
|
- this.sampleCode = "";
|
|
|
- this.sampleType = [];
|
|
|
- this.resultType = [];
|
|
|
- this.dict = [];
|
|
|
- this.scalesOptions = [];
|
|
|
- console.log("我走了11111111", this.childData, e);
|
|
|
- this.dataTypeTop = ""; // 标准数据的类型
|
|
|
+ this.item.mdCode = ''
|
|
|
+ this.item.sampleCode = ''
|
|
|
+ this.item.op = ''
|
|
|
+ this.item.oval = ''
|
|
|
+ this.item.ovalTwo = ''
|
|
|
+ this.item.ovalMany = []
|
|
|
+ this.item.opChild = ''
|
|
|
+ this.dataType = ''
|
|
|
+
|
|
|
+ this.sampleCode = ''
|
|
|
+ this.sampleType = []
|
|
|
+ this.resultType = []
|
|
|
+ this.dict = []
|
|
|
+ this.scalesOptions = []
|
|
|
+ console.log('我走了11111111', this.childData, e)
|
|
|
+ this.dataTypeTop = '' // 标准数据的类型
|
|
|
if (this.childData.type[e]) {
|
|
|
- this.scalesOptions = this.childData.type[e].list || [];
|
|
|
- this.moreDataType = e;
|
|
|
- this.page = 1;
|
|
|
- this.total = this.childData.type[e].total;
|
|
|
+ this.scalesOptions = this.childData.type[e].list || []
|
|
|
+ this.moreDataType = e
|
|
|
+ this.page = 1
|
|
|
+ this.total = this.childData.type[e].total
|
|
|
} else {
|
|
|
- this.scalesOptions = [];
|
|
|
- this.total = 0;
|
|
|
+ this.scalesOptions = []
|
|
|
+ this.total = 0
|
|
|
}
|
|
|
|
|
|
- this.isSpecialType();
|
|
|
+ this.isSpecialType()
|
|
|
|
|
|
// listByType({ type: e }).then((res) => {
|
|
|
// if(res.code == '0' && res.data){
|
|
@@ -636,175 +631,176 @@ export default {
|
|
|
},
|
|
|
// 检验是否是特殊类型,
|
|
|
isSpecialType() {
|
|
|
- this.isSpecial = false;
|
|
|
+ this.isSpecial = false
|
|
|
if (this.scalesOptions && this.scalesOptions.length == 1) {
|
|
|
if (!this.scalesOptions[0].id) {
|
|
|
- this.isSpecial = true;
|
|
|
- let arr = [];
|
|
|
+ this.isSpecial = true
|
|
|
+ const arr = []
|
|
|
this.scalesOptions[0].resultTypeList.forEach((item) => {
|
|
|
- if (item.scope == "all" || item.scope == this.item.dateType)
|
|
|
+ if (item.scope == 'all' || item.scope == this.item.dateType) {
|
|
|
arr.push({
|
|
|
name: item.name,
|
|
|
key: item.code,
|
|
|
dataType: item.dataType,
|
|
|
- dataContentType: item.dataContentType,
|
|
|
- });
|
|
|
- });
|
|
|
+ dataContentType: item.dataContentType
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.resultType = arr;
|
|
|
+ this.resultType = arr
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onListChange(item) {
|
|
|
// this.scalesOptions = JSON.parse(JSON.stringify(data))
|
|
|
- let add = true;
|
|
|
+ let add = true
|
|
|
this.scalesOptions.forEach((e) => {
|
|
|
if (e.id == item.id) {
|
|
|
- add = false;
|
|
|
+ add = false
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
if (add) {
|
|
|
- this.scalesOptions.push(item);
|
|
|
+ this.scalesOptions.push(item)
|
|
|
}
|
|
|
- this.childData.type[this.item.mdType].list = this.scalesOptions;
|
|
|
+ this.childData.type[this.item.mdType].list = this.scalesOptions
|
|
|
},
|
|
|
handleChangeScales(e, boolen) {
|
|
|
- this.resultType = [];
|
|
|
+ this.resultType = []
|
|
|
this.scalesOptions.forEach((item) => {
|
|
|
// console.log(item,'1245678999')
|
|
|
if (item.id == e) {
|
|
|
- this.dataTypeTop = item.dataType;
|
|
|
- console.log(e, item, "1245678999");
|
|
|
- this.item.mdName = item.name;
|
|
|
- this.item.rawType = item.dataType;
|
|
|
- this.item.sampleCode = item.sampleId || "";
|
|
|
+ this.dataTypeTop = item.dataType
|
|
|
+ console.log(e, item, '1245678999')
|
|
|
+ this.item.mdName = item.name
|
|
|
+ this.item.rawType = item.dataType
|
|
|
+ this.item.sampleCode = item.sampleId || ''
|
|
|
this.sampleType = [
|
|
|
- { name: item.sampleName || "--无--", key: item.sampleId || "" },
|
|
|
- ];
|
|
|
+ { name: item.sampleName || '--无--', key: item.sampleId || '' }
|
|
|
+ ]
|
|
|
|
|
|
if (item.resultTypeList) {
|
|
|
- let arr1 = [];
|
|
|
+ const arr1 = []
|
|
|
item.resultTypeList.forEach((ele) => {
|
|
|
- if (ele.scope == "all" || ele.scope == this.item.dateType) {
|
|
|
+ if (ele.scope == 'all' || ele.scope == this.item.dateType) {
|
|
|
arr1.push({
|
|
|
name: ele.name,
|
|
|
key: ele.code,
|
|
|
dataType: ele.dataType,
|
|
|
- dataContentType: ele.dataContentType,
|
|
|
- });
|
|
|
+ dataContentType: ele.dataContentType
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
- this.resultType = arr1;
|
|
|
- console.log(this.resultType, "下拉框");
|
|
|
+ this.resultType = arr1
|
|
|
+ console.log(this.resultType, '下拉框')
|
|
|
}
|
|
|
|
|
|
if (this.item.op) {
|
|
|
- this.resultTypeChange(this.item.op, true,this.item);
|
|
|
+ this.resultTypeChange(this.item.op, true, this.item)
|
|
|
}
|
|
|
|
|
|
if (!boolen) {
|
|
|
- this.item.sampleCode = "";
|
|
|
- this.item.op = "";
|
|
|
- this.item.oval = "";
|
|
|
- this.item.ovalTwo = "";
|
|
|
- this.item.ovalMany = [];
|
|
|
+ this.item.sampleCode = ''
|
|
|
+ this.item.op = ''
|
|
|
+ this.item.oval = ''
|
|
|
+ this.item.ovalTwo = ''
|
|
|
+ this.item.ovalMany = []
|
|
|
|
|
|
- this.dict = [];
|
|
|
+ this.dict = []
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
deptChange(e, data) {
|
|
|
- console.log(e, data);
|
|
|
- this.item.deptName = data.name;
|
|
|
+ console.log(e, data)
|
|
|
+ this.item.deptName = data.name
|
|
|
},
|
|
|
sampleChange(e) {
|
|
|
this.sampleType.forEach((ele) => {
|
|
|
- if (ele.key == "e") {
|
|
|
- this.item.sampleName = ele.name;
|
|
|
+ if (ele.key == 'e') {
|
|
|
+ this.item.sampleName = ele.name
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- resultTypeChange(e, type,data) {
|
|
|
+ resultTypeChange(e, type, data) {
|
|
|
if (!type) {
|
|
|
- this.item.oval = "";
|
|
|
- this.item.ovalTwo = "";
|
|
|
+ this.item.oval = ''
|
|
|
+ this.item.ovalTwo = ''
|
|
|
}
|
|
|
- let arrItem = {};
|
|
|
- console.log(this.resultType, e, "显示数据111");
|
|
|
+ let arrItem = {}
|
|
|
+ console.log(this.resultType, e, '显示数据111')
|
|
|
this.resultType.forEach((item) => {
|
|
|
if (item.key == e) {
|
|
|
- arrItem = item;
|
|
|
+ arrItem = item
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
// console.log(1, e, arrItem, this.resultType);
|
|
|
- this.dataType = arrItem.dataType;
|
|
|
+ this.dataType = arrItem.dataType
|
|
|
|
|
|
- if (arrItem.dataType == "dict") {
|
|
|
+ if (arrItem.dataType == 'dict') {
|
|
|
// 缓存字典
|
|
|
if (!this.childData.dict[arrItem.dataContentType]) {
|
|
|
getDict(arrItem.dataContentType).then((res) => {
|
|
|
- this.dict = res;
|
|
|
- let data = JSON.parse(JSON.stringify(this.childData.dict));
|
|
|
- data[e] = res;
|
|
|
- this.childData.dict = data;
|
|
|
- });
|
|
|
+ this.dict = res
|
|
|
+ const data = JSON.parse(JSON.stringify(this.childData.dict))
|
|
|
+ data[e] = res
|
|
|
+ this.childData.dict = data
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.dict = this.childData.dict[e];
|
|
|
+ this.dict = this.childData.dict[e]
|
|
|
}
|
|
|
}
|
|
|
- //叙述结果
|
|
|
- if (arrItem.dataType == "standard") {
|
|
|
- console.log(data,'1111111111111')
|
|
|
- let req ={
|
|
|
+ // 叙述结果
|
|
|
+ if (arrItem.dataType == 'standard') {
|
|
|
+ console.log(data, '1111111111111')
|
|
|
+ const req = {
|
|
|
type: arrItem.dataContentType
|
|
|
}
|
|
|
- if(data && data.ovalMany){
|
|
|
+ if (data && data.ovalMany) {
|
|
|
req.ids = data.ovalMany
|
|
|
}
|
|
|
dataPageType(req).then((res) => {
|
|
|
- if (res.code == "0" && res.data) {
|
|
|
- this.dict = res.data.list;
|
|
|
+ if (res.code == '0' && res.data) {
|
|
|
+ this.dict = res.data.list
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
onSelectChange(e, data) {
|
|
|
// console.log(e,data,'111111111搜索')
|
|
|
- let arrItem = {};
|
|
|
+ let arrItem = {}
|
|
|
this.resultType.forEach((item) => {
|
|
|
if (item.key == data.op) {
|
|
|
- arrItem = item;
|
|
|
+ arrItem = item
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
dataPageType({ type: arrItem.dataContentType, keywords: e }).then(
|
|
|
(res) => {
|
|
|
- if (res.code == "0" && res.data) {
|
|
|
- this.dict = res.data.list;
|
|
|
+ if (res.code == '0' && res.data) {
|
|
|
+ this.dict = res.data.list
|
|
|
}
|
|
|
}
|
|
|
- );
|
|
|
+ )
|
|
|
},
|
|
|
|
|
|
onChange() {
|
|
|
- this.$forceUpdate();
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
|
|
|
onClickType(t) {
|
|
|
if (t) {
|
|
|
- this.item.restriction = "Y";
|
|
|
- this.$forceUpdate();
|
|
|
+ this.item.restriction = 'Y'
|
|
|
+ this.$forceUpdate()
|
|
|
} else {
|
|
|
- this.item.restriction = "N";
|
|
|
- this.$forceUpdate();
|
|
|
+ this.item.restriction = 'N'
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
@@ -872,7 +868,7 @@ export default {
|
|
|
.el-select__tags-text{
|
|
|
max-width: 110px;
|
|
|
white-space: wrap;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|