Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into HEAD

This commit is contained in:
aoli.qu 2021-09-01 11:12:18 +08:00
commit 63416eb973
3 changed files with 23 additions and 16 deletions

View File

@ -114,8 +114,8 @@ export default {
methods: {
//
selectTree(selectedKeys, e) {
this.selectKey = e.node.eventKey;
this.selectTitle = e.node.title;
this.selectKey = e.node.dataRef.key;
this.selectTitle = e.node.dataRef.title;
this.$emit('getSelectTreeKey', this.selectKey);
},
// /

View File

@ -2,7 +2,7 @@
<a-form layout="inline" :model="form" ref="queryForm">
<a-row :gutter="48">
<a-col :md="6" :sm="24" v-for="(item, index) in list" :key="index">
<a-form-item :label="item.placeholder">
<a-form-item :label="item.placeholder" :style="{marginBottom: '8px'}">
<!-- input -->
<a-input v-if="item.type === 'input'" v-model="form[item.key]" :type="item.type || 'text'" :placeholder="item.placeholder || '请输入'" />
@ -17,13 +17,7 @@
</a-select>
<!-- date -->
<a-date-picker
v-if="item.type === 'date'"
v-model="form[item.key]"
style="width: 100%"
:format="item.format"
:valueFormat="item.format"
:placeholder="item.placeholder || '请输入日期'"/>
<a-date-picker v-if="item.type === 'date'" v-model="form[item.key]" style="width: 100%" :format="item.format" :valueFormat="item.format" :placeholder="item.placeholder || '请输入日期'" />
</a-form-item>
</a-col>
@ -31,12 +25,20 @@
<a-button type="primary" @click="handleQuery">查询</a-button>
<a-button @click="resetQuery">重置</a-button>
</a-col>
<!-- orgTree -->
<a-col :span="24" :style="{marginTop: '-8px', marginBottom: '8px'}">
<org-tree v-show="orgTree.ifshow" :startOrganizationId="orgTree.startOrganizationId" @getSelectTreeKey="key => form[orgTree.formKey] = key"></org-tree>
</a-col>
</a-row>
</a-form>
</template>
<script>
import orgTree from '../OrgTree/Index'
export default {
components: { orgTree },
props: {
form: {
type: Object,
@ -47,6 +49,11 @@ export default {
type: Array,
required: true,
default: () => []
},
orgTree: {
type: Object,
required: false,
default: () => { return { ifshow: false, formKey: '', startOrganizationId: '' } }
}
},
data() {

View File

@ -49,7 +49,7 @@ const errorHandler = (error) => {
request.interceptors.request.use(config => {
// const token = storage.get(ACCESS_TOKEN)
// 由于登录接口待联调token使用默认值
const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwMzU2Nzg5LWYyOGEtNDYxYi1iNTRhLTM2MWYzZjdhZjg2NSJ9.4vGoaj9KK8aYp9gEz2cnRM8MBWPrqIo8O5wNgbYK4-JUE3naeEuejjr3JfZ57TLbMYWqG1MkJ0kAT-2GMgreGQ'
const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjBkYjU0YzQ0LWQ5MDktNDQ0ZC05YTYwLTE4ZGU1YjgyMzg5YyJ9.l37UO6WC9tPTuoJnbWKpTusHdtmon95Islq-jRNo9zmCKJ4GWwnY9_szBpgOii2Y7OVvc4sWibmFBdTwmAg8sg'
// 如果 token 存在,让每个请求携带自定义 token 请根据实际情况自行修改
if (token) {
config.headers[ACCESS_TOKEN] = token