|
|
@@ -10,15 +10,15 @@
|
|
|
label-position="left">
|
|
|
<el-form-item>
|
|
|
<span slot="label"> <span style="color: red"> * </span>机构 </span>
|
|
|
- <org-tree-select v-model="data.orgIdList" :disabled="data.disabled" ></org-tree-select>
|
|
|
+ <org-tree-select v-model="formData.orgIds" :disabled="disabled" ></org-tree-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item >
|
|
|
<span slot="label"> <span style="color: red"> * </span>生效日期 </span>
|
|
|
<el-date-picker
|
|
|
v-model="formData.effectiveDate"
|
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
|
- :disabled="data.disabled"
|
|
|
- :clearable="!data.disabled"
|
|
|
+ :disabled="disabled"
|
|
|
+ :clearable="!disabled"
|
|
|
:picker-options="startDatepickerOptions"
|
|
|
popper-class="no-atTheMoment"
|
|
|
type="date"
|
|
|
@@ -172,14 +172,11 @@ export default {
|
|
|
id:0,
|
|
|
orgId:null,
|
|
|
formData: {
|
|
|
- orgIdList: [],
|
|
|
+ orgIds:[],
|
|
|
dayOfWeeks: json,
|
|
|
effectiveDate:null,
|
|
|
},
|
|
|
- data: {
|
|
|
- orgIdList: [],
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
+ disabled: false,
|
|
|
startDatepickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
const date = new Date();
|
|
|
@@ -223,12 +220,10 @@ export default {
|
|
|
this.isShow = true;
|
|
|
this.id = row.id;
|
|
|
this.orgId = row.orgId;
|
|
|
+ this.disabled = true;
|
|
|
this.getData();
|
|
|
},
|
|
|
onSubmit() {
|
|
|
- this.formData.orgIds = this.data.orgIdList.map(v=>{
|
|
|
- return v.id
|
|
|
- });
|
|
|
if (this.formData.orgIds.length < 1) {
|
|
|
this.$message.error("机构不能为空");
|
|
|
return;
|
|
|
@@ -284,25 +279,8 @@ export default {
|
|
|
async getData() {
|
|
|
queryInfoById({id:this.id}).then(res=>{
|
|
|
this.formData = res.data;
|
|
|
- if (this.id != 0) {
|
|
|
- this.tagsList = [
|
|
|
- {
|
|
|
- id:res.data.orgId,
|
|
|
- name:res.data.orgName
|
|
|
- }
|
|
|
- ];
|
|
|
- this.data.disabled = true;
|
|
|
- this.data.orgIdList = [this.formData.orgId];
|
|
|
- if (this.orgId) {
|
|
|
- this.data.orgIdList = [this.formData.orgId];
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.data.orgIdList = [];
|
|
|
- this.data.disabled= false;
|
|
|
- }
|
|
|
+ this.formData.orgIds = [res.data.orgId];
|
|
|
})
|
|
|
-
|
|
|
- // this.data.orgIdList =[];
|
|
|
},
|
|
|
onEnableChange(workTime) {
|
|
|
if (!workTime.isWorkday) {
|
|
|
@@ -317,14 +295,13 @@ export default {
|
|
|
handleClose() {
|
|
|
this.id=null;
|
|
|
this.formData = {
|
|
|
- orgIdList: [],
|
|
|
+ orgIds: [],
|
|
|
dayOfWeeks: json,
|
|
|
effectiveDate: null,
|
|
|
checkDataResult:null,
|
|
|
};
|
|
|
this.tagsList = [];
|
|
|
- this.data.orgIdList = [];
|
|
|
- this.data.disabled= false;
|
|
|
+ this.disabled= false;
|
|
|
this.checkData=null;
|
|
|
this.checkMsg=null;
|
|
|
this.centerDialogVisiblea=false;
|