|
@@ -14,7 +14,7 @@
|
|
|
v-for="item in hisTypes"
|
|
|
:key="item.val"
|
|
|
:label="item.name"
|
|
|
- :value="Number(item.val)">
|
|
|
+ :value="item.val">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -34,7 +34,7 @@
|
|
|
<span class="showInfo">{{form.defaultModule==1?'是':'否'}}</span>
|
|
|
</el-form-item> -->
|
|
|
|
|
|
- <el-form-item label="质控条目:" prop="qcItem">
|
|
|
+ <el-form-item label="质控条目:" prop="qcItem" :class="spread?'qcitem-list':'qcitem-list-up'">
|
|
|
<el-collapse>
|
|
|
<el-collapse-item v-for="(item,i) in qcItemList" :title="i" :name="i">
|
|
|
<el-table
|
|
@@ -70,6 +70,15 @@
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-form-item>
|
|
|
+ <img v-if="spread" src="../../images/up.png" class="spread-icon" @click="toggleSpread" title="收起" alt="收起"/>
|
|
|
+ <img v-if="!spread" src="../../images/spread.png" class="spread-icon" @click="toggleSpread" title="展开" alt="展开"/>
|
|
|
+ <el-form-item label="其他质控类型:" prop="typeIdList" class="formItem widthLarge">
|
|
|
+ </el-form-item>
|
|
|
+ <OtherQcTypePour :hospital="form.hospitalId"
|
|
|
+ :moduleName="form.entryId"
|
|
|
+ :typeId="form.id"
|
|
|
+ @changeActionData="moduleTypeChange"
|
|
|
+ :selectedTag="form.qcTypeSimpDTOList"></OtherQcTypePour>
|
|
|
<el-button class="disclButn" size="small" type="primary" :disabled = 'saveDisable' @click="comfirn('form')">确定</el-button>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -78,6 +87,7 @@
|
|
|
</template>
|
|
|
<script type="text/javascript">
|
|
|
import api from '@api/qualityControl.js';
|
|
|
+ import OtherQcTypePour from './OtherQcTypePour.vue';
|
|
|
export default {
|
|
|
name:'AddQcType',
|
|
|
data(){
|
|
@@ -86,11 +96,16 @@
|
|
|
list:[],
|
|
|
labelPosition:'left',
|
|
|
title:'质控类型维护-添加质控类型',
|
|
|
+ spread:false,
|
|
|
+ hisTypes:[],
|
|
|
form:{
|
|
|
id:'',
|
|
|
- hospitalId:"",
|
|
|
+ hospitalId:'',
|
|
|
name:'',
|
|
|
qcTypeCasesEntryVOList:[],
|
|
|
+ qcTypeSimpDTOList:[],
|
|
|
+ entryId:'', //兼容
|
|
|
+ typeIdList:[],//其他质控类型id
|
|
|
// defaultModule: 0
|
|
|
},
|
|
|
rules:{
|
|
@@ -112,6 +127,9 @@
|
|
|
qcItemList:{},
|
|
|
}
|
|
|
},
|
|
|
+ components:{
|
|
|
+ OtherQcTypePour
|
|
|
+ },
|
|
|
created(){
|
|
|
this.getAllTypes();
|
|
|
let {isCopy,info} = this.$route.params;
|
|
@@ -122,16 +140,20 @@
|
|
|
this.qcItemList=infoCopy.entryMap;
|
|
|
this.form = {
|
|
|
id:isCopy?"":infoCopy.id,
|
|
|
- hospitalId:infoCopy.hospitalId,
|
|
|
+ hospitalId:''+infoCopy.hospitalId,
|
|
|
name:infoCopy.name,
|
|
|
qcTypeCasesEntryVOList:[],
|
|
|
+ qcTypeSimpDTOList:isCopy?[]:infoCopy.qcTypeSimpDTOList,
|
|
|
// defaultModule:+infoCopy.defaultModule
|
|
|
};
|
|
|
//this.getQcTypeItem({hospitalId:info.hospitalId});
|
|
|
}else{
|
|
|
- let hospitalId = localStorage.getItem("qcSelectHospital")||this.hisTypes[0].val;
|
|
|
- this.form.hospitalId = +hospitalId;
|
|
|
- this.getQcTypeItem({hospitalId:hospitalId});
|
|
|
+ const that = this;
|
|
|
+ setTimeout(()=>{
|
|
|
+ let hospitalId = that.hisTypes[0].val;
|
|
|
+ that.form.hospitalId = hospitalId;
|
|
|
+ that.getQcTypeItem({hospitalId:hospitalId});
|
|
|
+ },100)
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
@@ -152,6 +174,12 @@
|
|
|
},
|
|
|
methods:{
|
|
|
handleTemChange() {},
|
|
|
+ toggleSpread(){
|
|
|
+ this.spread=!this.spread;
|
|
|
+ },
|
|
|
+ moduleTypeChange(list){
|
|
|
+ this.form.typeIdList=[...list];
|
|
|
+ },
|
|
|
changeHospital(val){
|
|
|
localStorage.setItem("qcSelectHospital",val);
|
|
|
this.getQcTypeItem({hospitalId:val});
|
|
@@ -172,17 +200,18 @@
|
|
|
});
|
|
|
},
|
|
|
getAllTypes(){
|
|
|
- if(localStorage.getItem("qcHospitalTypes")){
|
|
|
+ /*if(localStorage.getItem("qcHospitalTypes")){
|
|
|
this.hisTypes = JSON.parse(localStorage.getItem("qcHospitalTypes"));
|
|
|
return ;
|
|
|
- }
|
|
|
+ }*/
|
|
|
//获取枚举信息
|
|
|
api.getQcTypes().then((res)=>{
|
|
|
if(res.data.code==="0"){
|
|
|
const data = res.data.data;
|
|
|
- localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
|
|
|
+ this.hisTypes =data[13];
|
|
|
+ /*localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
|
|
|
localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
|
|
|
- localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
|
|
|
+ localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));*/
|
|
|
}else{
|
|
|
this.warning("获取枚举信息失败");
|
|
|
}
|
|
@@ -192,39 +221,10 @@
|
|
|
this.$refs[form].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if(this.form.id){//修改
|
|
|
- let param = Object.assign({},this.form);
|
|
|
+ let param = Object.assign({},this.form,{qcTypeSimpDTOList:undefined});
|
|
|
param.name=param.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(param).then((res)=>{
|
|
|
- // if (res.data.code === '-1') {
|
|
|
- // // 默认标准类型存在,是否替换
|
|
|
- // this.$alert('默认标准类型已存在,是否替换?', '提示', {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // type: 'warning'
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // param = { ...param, defineType: 1 };
|
|
|
- // api.addQcType(param).then(res => {
|
|
|
- // if (res.data.code == 0) {
|
|
|
- // this.$message({
|
|
|
- // message: '修改成功',
|
|
|
- // type: 'success'
|
|
|
- // });
|
|
|
- // //返回带搜索条件的首页
|
|
|
- // this.$router.push({
|
|
|
- // name: 'QCTypeMang',
|
|
|
- // params: Object.assign({}, this.$route.params, {currentPage: 1})
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.$message({
|
|
|
- // message: res.data.msg,
|
|
|
- // type: 'warning'
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // })
|
|
|
- // .catch(() => {});
|
|
|
- // } else
|
|
|
if(res.data.code==0){
|
|
|
this.$message({
|
|
|
message:"修改成功",
|
|
@@ -248,35 +248,6 @@
|
|
|
params.name=params.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(params).then((res)=>{
|
|
|
- // if (res.data.code === '-1') {
|
|
|
- // // 默认标准类型存在,是否替换
|
|
|
- // this.$alert('默认标准类型已存在,是否替换?', '提示', {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // type: 'warning'
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // params = { ...params, defineType: 1 };
|
|
|
- // api.addQcType(params).then(res => {
|
|
|
- // if (res.data.code == 0) {
|
|
|
- // this.$message({
|
|
|
- // message: '修改成功',
|
|
|
- // type: 'success'
|
|
|
- // });
|
|
|
- // //返回带搜索条件的首页
|
|
|
- // this.$router.push({
|
|
|
- // name: 'QCTypeMang',
|
|
|
- // params: Object.assign({}, this.$route.params, {currentPage: 1})
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.$message({
|
|
|
- // message: res.data.msg,
|
|
|
- // type: 'warning'
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // })
|
|
|
- // .catch(() => {});
|
|
|
- // } else
|
|
|
if(res.data.code==0){
|
|
|
this.$message({
|
|
|
message:"添加成功",
|
|
@@ -337,4 +308,14 @@
|
|
|
.showInfo {
|
|
|
margin-left: 16px;
|
|
|
}
|
|
|
+ .qcitem-list-up{
|
|
|
+ max-height: 150px;
|
|
|
+ overflow-y: hidden;
|
|
|
+ }
|
|
|
+ .spread-icon{
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 448px;
|
|
|
+ }
|
|
|
</style>
|