|
@@ -13,74 +13,73 @@
|
|
<span>2021-04-08 12:00:00</span>
|
|
<span>2021-04-08 12:00:00</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form> -->
|
|
</el-form> -->
|
|
- <!-- 搜索项 -->
|
|
|
|
- <search-bar ref="searchBar" :conditionForm="orgConditonForm" @submitSearch="receiveSearch"></search-bar>
|
|
|
|
- <!-- 操作 -->
|
|
|
|
- <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
|
|
|
|
|
|
|
|
- <dg-row>
|
|
|
|
- <dg-col :span="24">
|
|
|
|
- <h4 class="dg-words-title-second">单位详情</h4>
|
|
|
|
- <el-form class="institutional-info" ref="form" :model="formInfo" label-suffix=":" label-width="120px">
|
|
|
|
- <el-row v-if="formInfo.id">
|
|
|
|
- <el-col :span="12" v-for="(item, index) in orgDetail" :key="index">
|
|
|
|
- <el-form-item :label="item.label">
|
|
|
|
- <div v-if="item.code" v-translate="{ code: item.code }">{{ formInfo[item.value] }}</div>
|
|
|
|
- <div v-else-if="item.enum" v-translate="{ enum: item.enum }">
|
|
|
|
- {{ formInfo[item.value] }}
|
|
|
|
- </div>
|
|
|
|
- <div v-else-if="item.url" v-translate="{ url: item.url, valueName: 'CODE', labelName: 'VALUE' }">
|
|
|
|
- {{ formInfo[item.value] }}
|
|
|
|
- </div>
|
|
|
|
- <span v-else>{{ formInfo[item.value] }}</span>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <p v-else style="text-align:center">暂无数据</p>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ <div class="buttonGroup">
|
|
|
|
+ <dg-button type="primary" @click="handleImport" icon="el-icon-upload2">导入</dg-button>
|
|
|
|
+ <dg-button type="primary" @click="handleSynchro" icon="el-icon-refresh">同步</dg-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <dg-row :gutter="20">
|
|
|
|
+ <dg-col :span="5">
|
|
|
|
+ <dg-card shadow="never" header="机构列表">
|
|
|
|
+ <tree
|
|
|
|
+ :key="key"
|
|
|
|
+ ref="tree"
|
|
|
|
+ class="u-pm__left"
|
|
|
|
+ :search="true"
|
|
|
|
+ apiName="getOrgTree"
|
|
|
|
+ @handleGetNode="handleGetNode"
|
|
|
|
+ @submitRootNode="submitRootNode"
|
|
|
|
+ />
|
|
|
|
+ </dg-card>
|
|
|
|
+ </dg-col>
|
|
|
|
+ <dg-col :span="19">
|
|
|
|
+ <dg-card shadow="never" header="机构管理">
|
|
|
|
+ <el-form class="institutional-info" ref="form" :model="formInfo" label-suffix=":" label-width="120px">
|
|
|
|
+ <el-row v-if="formInfo.id">
|
|
|
|
+ <el-col :span="12" v-for="(item, index) in orgDetail" :key="index">
|
|
|
|
+ <el-form-item :label="item.label">
|
|
|
|
+ <div v-if="item.code" v-translate="{ code: item.code }">{{ formInfo[item.value] }}</div>
|
|
|
|
+ <div v-else-if="item.enum" v-translate="{ enum: item.enum }">
|
|
|
|
+ {{ formInfo[item.value] }}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else-if="item.url" v-translate="{ url: item.url, valueName: 'CODE', labelName: 'VALUE' }">
|
|
|
|
+ {{ formInfo[item.value] }}
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else>{{ formInfo[item.value] }}</span>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ </dg-card>
|
|
</dg-col>
|
|
</dg-col>
|
|
</dg-row>
|
|
</dg-row>
|
|
</main>
|
|
</main>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { orgDetail, orgConditonForm } from '../DataConfig';
|
|
|
|
|
|
+import Tree from '@/pages/common/tree';
|
|
|
|
+import { orgDetail } from '../DataConfig';
|
|
import { orgInfoDetail } from '@/api/data-auth';
|
|
import { orgInfoDetail } from '@/api/data-auth';
|
|
import { authOrgSync } from '@/api/sync';
|
|
import { authOrgSync } from '@/api/sync';
|
|
import importFile from '@/components/import';
|
|
import importFile from '@/components/import';
|
|
import { orgImportUrl } from '@/api/import';
|
|
import { orgImportUrl } from '@/api/import';
|
|
-import searchBar from '@/components/search-bar';
|
|
|
|
-import operateBar from '@/components/operate-bar';
|
|
|
|
export default {
|
|
export default {
|
|
name: 'institutional-attributes', // 组件名称
|
|
name: 'institutional-attributes', // 组件名称
|
|
props: {},
|
|
props: {},
|
|
- components: { searchBar, operateBar },
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
orgDetail,
|
|
orgDetail,
|
|
- orgConditonForm,
|
|
|
|
- pageOptList: ['导入', '同步'],
|
|
|
|
formInfo: {},
|
|
formInfo: {},
|
|
- orgId: '',
|
|
|
|
|
|
+ keyword: '',
|
|
|
|
+ currentId: '',
|
|
key: 0
|
|
key: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {}, // 计算属性
|
|
computed: {}, // 计算属性
|
|
|
|
+ watch: {}, // 侦听器(扩展的计算属性)
|
|
|
|
+ components: { Tree }, // 注册局部组件
|
|
methods: {
|
|
methods: {
|
|
- /**
|
|
|
|
- * @description:查询
|
|
|
|
- */
|
|
|
|
- receiveSearch(val) {
|
|
|
|
- if (this.orgId !== val.orgId.value) {
|
|
|
|
- this.formInfo = {};
|
|
|
|
- this.orgId = val.orgId.value;
|
|
|
|
- this.getDetail();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- /**
|
|
|
|
- * @description:接收操作事件
|
|
|
|
- */
|
|
|
|
- receviceOpt(opt, row) {},
|
|
|
|
/**
|
|
/**
|
|
* @description:导入方法
|
|
* @description:导入方法
|
|
*/
|
|
*/
|
|
@@ -116,13 +115,31 @@ export default {
|
|
this.handleSearch();
|
|
this.handleSearch();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ /**
|
|
|
|
+ * @description:树方法
|
|
|
|
+ */
|
|
|
|
+ handleGetNode({ id }) {
|
|
|
|
+ if (this.currentId != id) {
|
|
|
|
+ this.formInfo = {};
|
|
|
|
+ this.currentId = id;
|
|
|
|
+ this.getDetail();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* 获取机构详情
|
|
* 获取机构详情
|
|
*/
|
|
*/
|
|
getDetail() {
|
|
getDetail() {
|
|
- orgInfoDetail(this.orgId).then((res) => {
|
|
|
|
|
|
+ orgInfoDetail(this.currentId).then((res) => {
|
|
this.formInfo = res.data;
|
|
this.formInfo = res.data;
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * @description: 默认查询跟节点
|
|
|
|
+ */
|
|
|
|
+ submitRootNode({ id, name }) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.handleGetNode({ id, name });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {}, // 组件创建完成后
|
|
created() {}, // 组件创建完成后
|