|
@@ -21,27 +21,27 @@
|
|
|
</div> -->
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可查询行</p>
|
|
|
- <el-input v-model="form.input1" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.query_row_condition" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可查询列</p>
|
|
|
- <el-input v-model="form.input2" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.query_col_conditon" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可删除行</p>
|
|
|
- <el-input v-model="form.input3" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.delete_row_condition" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可新增列</p>
|
|
|
- <el-input v-model="form.input4" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.new_col_condition" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可编辑行</p>
|
|
|
- <el-input v-model="form.input5" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.edit_row_condition" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
<div class="juris_list" :style="{ marginBottom: marginB }">
|
|
|
<p>许可编辑列</p>
|
|
|
- <el-input v-model="form.input6" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ <el-input v-model="form.edit_col_condition" placeholder="请输入内容" size="small"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -69,34 +69,13 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- pickerOptionsStart: {
|
|
|
- disabledDate: (time) => {
|
|
|
- if (this.form.endWeeks) {
|
|
|
- return time.getTime() >= new Date(this.endWeeks).getTime();
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- pickerOptionsEnd: {
|
|
|
- disabledDate: (time) => {
|
|
|
- if (this.form.firstWeeks) {
|
|
|
- return (
|
|
|
- time.getTime() <= new Date(this.firstWeeks).getTime() - 86400000
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
form: {
|
|
|
- // endWeeks: "",
|
|
|
- // firstWeeks: "",
|
|
|
- // radio: 1,
|
|
|
- value1: "",
|
|
|
- value2: "",
|
|
|
- input1: "",
|
|
|
- input2: "",
|
|
|
- input3: "",
|
|
|
- input4: "",
|
|
|
- input5: "",
|
|
|
- input6: "",
|
|
|
+ query_row_condition: "",
|
|
|
+ query_col_conditon: "",
|
|
|
+ delete_row_condition: "",
|
|
|
+ new_col_condition: "",
|
|
|
+ edit_row_condition: "",
|
|
|
+ edit_col_condition: ""
|
|
|
},
|
|
|
option: [
|
|
|
{
|
|
@@ -113,26 +92,8 @@ export default {
|
|
|
watch: {
|
|
|
authTo: {
|
|
|
handler (obj) {
|
|
|
- const {
|
|
|
- // Action,
|
|
|
- // ValidBegin,
|
|
|
- // ValidEnd,
|
|
|
- QueryRow,
|
|
|
- QueryCol,
|
|
|
- NewCol,
|
|
|
- EditCol,
|
|
|
- EditRow,
|
|
|
- DeleteRow,
|
|
|
- } = obj;
|
|
|
- // this.form.radio = Number(Action);
|
|
|
- // this.form.firstWeeks = ValidBegin;
|
|
|
- // this.form.endWeeks = ValidEnd;
|
|
|
- this.form.input1 = QueryRow;
|
|
|
- this.form.input2 = QueryCol;
|
|
|
- this.form.input3 = DeleteRow;
|
|
|
- this.form.input4 = NewCol;
|
|
|
- this.form.input5 = EditRow;
|
|
|
- this.form.input6 = EditCol;
|
|
|
+ this.form = _.cloneDeep(obj)
|
|
|
+ this.$store.dispatch("auth/changeAuthId", obj.auth_id)
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
@@ -145,6 +106,8 @@ export default {
|
|
|
authList: {
|
|
|
handler (arr) {
|
|
|
this.$store.dispatch("auth/changeAuthList", arr);
|
|
|
+ this.$store.dispatch("auth/changeAuthMsg", arr);
|
|
|
+ this.$store.dispatch("auth/changeAuthArrs", arr);
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
@@ -153,41 +116,14 @@ export default {
|
|
|
const id = this.$store.getters.authId;
|
|
|
const obj = arr.filter((item) => item.auth_id === id)[0];
|
|
|
this.clearFormData();
|
|
|
- this.setFormData(obj);
|
|
|
+ this.setFormData(_.cloneDeep(obj));
|
|
|
},
|
|
|
deep: true,
|
|
|
- },
|
|
|
- // "$store.state.auth.authStatus": {
|
|
|
- // handler (arr) {
|
|
|
- // if (arr && arr.length) {
|
|
|
- // const datas = this.$store.getters.authList;
|
|
|
- // const res = datas.filter(item => !arr.some(p => item.authId == p.auth_id))
|
|
|
- // this.$store.dispatch('auth/changeAuthList', res)
|
|
|
- // this.clearFormData()
|
|
|
- // }
|
|
|
- // },
|
|
|
- // deep: true,
|
|
|
- // },
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- setTime () {
|
|
|
- if (this.form.endWeeks <= this.form.firstWeeks) {
|
|
|
- this.form.endWeeks = "";
|
|
|
- this.$message.error("结束时间不能小于开始时间,请重新选择");
|
|
|
- }
|
|
|
- },
|
|
|
getData () {
|
|
|
- const obj = {
|
|
|
- // Action: this.form.radio,
|
|
|
- // ValidBegin: this.form.firstWeeks,
|
|
|
- // ValidEnd: this.form.endWeeks,
|
|
|
- QueryRow: this.form.input1,
|
|
|
- QueryCol: this.form.input2,
|
|
|
- NewCol: this.form.input4,
|
|
|
- EditCol: this.form.input6,
|
|
|
- EditRow: this.form.input5,
|
|
|
- DeleteRow: this.form.input3,
|
|
|
- };
|
|
|
+ const obj = _.cloneDeep(this.form);
|
|
|
this.$emit("getData", obj);
|
|
|
const arr = this.$store.getters.authArrs;
|
|
|
const datas = _.unionBy(arr, "auth_id");
|
|
@@ -212,15 +148,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
clearFormData () {
|
|
|
- // this.form.radio = "";
|
|
|
- // this.form.firstWeeks = "";
|
|
|
- // this.form.endWeeks = "";
|
|
|
- this.form.input1 = "";
|
|
|
- this.form.input2 = "";
|
|
|
- this.form.input3 = "";
|
|
|
- this.form.input4 = "";
|
|
|
- this.form.input5 = "";
|
|
|
- this.form.input6 = "";
|
|
|
+ this.form.query_row_condition = "";
|
|
|
+ this.form.query_col_conditon = "";
|
|
|
+ this.form.delete_row_condition = "";
|
|
|
+ this.form.new_col_condition = "";
|
|
|
+ this.form.edit_row_condition = "";
|
|
|
+ this.form.edit_col_condition = "";
|
|
|
},
|
|
|
setFormData (obj) {
|
|
|
let data = {};
|
|
@@ -229,26 +162,7 @@ export default {
|
|
|
} else {
|
|
|
data = obj;
|
|
|
}
|
|
|
- const {
|
|
|
- // Action = "",
|
|
|
- // ValidBegin = "",
|
|
|
- // ValidEnd = "",
|
|
|
- QueryRow = "",
|
|
|
- QueryCol = "",
|
|
|
- NewCol = "",
|
|
|
- EditCol = "",
|
|
|
- EditRow = "",
|
|
|
- DeleteRow = "",
|
|
|
- } = data;
|
|
|
- // this.form.radio = Number(Action);
|
|
|
- // this.form.firstWeeks = ValidBegin;
|
|
|
- // this.form.endWeeks = ValidEnd;
|
|
|
- this.form.input1 = QueryRow;
|
|
|
- this.form.input2 = QueryCol;
|
|
|
- this.form.input3 = DeleteRow;
|
|
|
- this.form.input4 = NewCol;
|
|
|
- this.form.input5 = EditRow;
|
|
|
- this.form.input6 = EditCol;
|
|
|
+ this.form = _.cloneDeep(data);
|
|
|
},
|
|
|
},
|
|
|
};
|