|
@@ -7,191 +7,197 @@
|
|
|
* @Description:
|
|
|
-->
|
|
|
<template>
|
|
|
- <main class="application-properties">
|
|
|
- <el-form ref="ruleForm" inline :model="form">
|
|
|
- <el-form-item label="应用系统名称">
|
|
|
- <el-input v-model="form.applyName.value" placeholder="请输入应用系统名称" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="应用系统在用标识">
|
|
|
- <dg-select
|
|
|
- v-model="form.applyStatus.value"
|
|
|
- placeholder="请选择应用系统在用标识"
|
|
|
- code="DM_APPLY_STATUS"
|
|
|
- style="width: 13rem"
|
|
|
- clearable
|
|
|
- >
|
|
|
- </dg-select>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item label="应用系统事权单位代码">
|
|
|
+ <main class="application-properties">
|
|
|
+ <el-form ref="ruleForm" inline :model="form">
|
|
|
+ <el-form-item label="应用系统名称">
|
|
|
+ <el-input v-model="form.applyName.value" placeholder="请输入应用系统名称" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="应用系统在用标识">
|
|
|
+ <dg-select
|
|
|
+ v-model="form.applyStatus.value"
|
|
|
+ placeholder="请选择应用系统在用标识"
|
|
|
+ code="DM_APPLY_STATUS"
|
|
|
+ style="width: 13rem"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </dg-select>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="应用系统事权单位代码">
|
|
|
<el-input
|
|
|
v-model="form.managerOrgCode.value"
|
|
|
placeholder="请输入应用系统事权单位代码"
|
|
|
clearable
|
|
|
></el-input>
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item label="上线日期">
|
|
|
- <dg-date-picker
|
|
|
- v-model="form.lineTime.value"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- clearable
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- :unlink-panels="true"
|
|
|
- >
|
|
|
- </dg-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
|
|
|
- <dg-button type="primary" @click="handleReset" icon="el-icon-refresh-right">重置</dg-button>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item label="最近同步时间:" style="float: right">
|
|
|
+ <el-form-item label="上线日期">
|
|
|
+ <dg-date-picker
|
|
|
+ v-model="form.lineTime.value"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ clearable
|
|
|
+ value-format="yyyyMMddHHmmss"
|
|
|
+ :unlink-panels="true"
|
|
|
+ >
|
|
|
+ </dg-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
|
|
|
+ <dg-button type="primary" @click="handleReset" icon="el-icon-refresh-right">重置</dg-button>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="最近同步时间:" style="float: right">
|
|
|
<span>2021-04-08 12:00:00</span>
|
|
|
</el-form-item> -->
|
|
|
- </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>
|
|
|
+ </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>
|
|
|
|
|
|
- <Table ref="myTable" :url="tableUrl" :headerData="ApplicationTableData" :condition="form">
|
|
|
- <dg-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="u-table__operation">
|
|
|
- <el-tooltip content="详情" effect="dark" placement="top-end">
|
|
|
- <i class="el-icon-document" @click="handleViewDetail(scope.row)"></i>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </dg-table-column>
|
|
|
- </Table>
|
|
|
- </main>
|
|
|
+ <Table ref="myTable" :url="tableUrl" :headerData="ApplicationTableData" :condition="form">
|
|
|
+ <dg-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="u-table__operation">
|
|
|
+ <el-tooltip content="详情" effect="dark" placement="top-end">
|
|
|
+ <i class="el-icon-document" @click="handleViewDetail(scope.row)"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </dg-table-column>
|
|
|
+ </Table>
|
|
|
+ </main>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Table from "@/pages/common/table";
|
|
|
-import { ApplicationTableData } from "../DataConfig";
|
|
|
-// import detail from "./detail";
|
|
|
-import detail from "../../auth-object-manage/appfun-resource-manage/add-app-form";
|
|
|
-import importFile from "@/components/import";
|
|
|
-import { appRestApi } from "@/api/application";
|
|
|
-import { appSync } from "@/api/sync";
|
|
|
-import { appImportUrl } from "@/api/import";
|
|
|
+import Table from '@/pages/common/table';
|
|
|
+import { ApplicationTableData } from '../DataConfig';
|
|
|
+import FormDetail from '@/components/form-detail';
|
|
|
+import { appForm } from '@/pages/data-auth-module/auth-object-manage/appfun-resource-manage/DataConfig';
|
|
|
+import importFile from '@/components/import';
|
|
|
+import { appRestApi } from '@/api/application';
|
|
|
+import { appSync } from '@/api/sync';
|
|
|
+import { appImportUrl } from '@/api/import';
|
|
|
export default {
|
|
|
- name: "application-properties", // 组件名称
|
|
|
- props: {
|
|
|
- // 接收父组件的数据
|
|
|
+ name: 'application-properties', // 组件名称
|
|
|
+ props: {
|
|
|
+ // 接收父组件的数据
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ // 组件内部参数
|
|
|
+ return {
|
|
|
+ // 参数名称及默认值
|
|
|
+ form: {
|
|
|
+ applyName: {
|
|
|
+ value: '',
|
|
|
+ op: 'like'
|
|
|
+ },
|
|
|
+ applyStatus: {
|
|
|
+ value: '',
|
|
|
+ op: '='
|
|
|
+ },
|
|
|
+ managerOrgCode: {
|
|
|
+ value: '',
|
|
|
+ op: 'like'
|
|
|
+ },
|
|
|
+ lineTime: {
|
|
|
+ value: '',
|
|
|
+ op: 'between',
|
|
|
+ type: 'DATE',
|
|
|
+ format: 'yyyyMMddHHmmss'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ApplicationTableData,
|
|
|
+ tableUrl: appRestApi.table
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {}, // 计算属性
|
|
|
+ watch: {}, // 侦听器(扩展的计算属性)
|
|
|
+ components: { Table }, // 注册局部组件
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * @description:表单查询方法
|
|
|
+ */
|
|
|
+ handleSearch() {
|
|
|
+ this.$refs.myTable.handleSearchClick();
|
|
|
},
|
|
|
- data() {
|
|
|
- // 组件内部参数
|
|
|
- return {
|
|
|
- // 参数名称及默认值
|
|
|
- form: {
|
|
|
- applyName: {
|
|
|
- value: "",
|
|
|
- op: "like"
|
|
|
- },
|
|
|
- applyStatus: {
|
|
|
- value: "",
|
|
|
- op: "="
|
|
|
- },
|
|
|
- managerOrgCode: {
|
|
|
- value: "",
|
|
|
- op: "like"
|
|
|
- },
|
|
|
- lineTime: {
|
|
|
- value: "",
|
|
|
- op: "between",
|
|
|
- type: "DATE",
|
|
|
- format: "yyyyMMddHHmmss"
|
|
|
- }
|
|
|
- },
|
|
|
- ApplicationTableData,
|
|
|
- tableUrl: appRestApi.table
|
|
|
- };
|
|
|
+ /**
|
|
|
+ * 重置
|
|
|
+ */
|
|
|
+ handleReset() {
|
|
|
+ for (const key in this.form) {
|
|
|
+ this.form[key].value = '';
|
|
|
+ }
|
|
|
},
|
|
|
- computed: {}, // 计算属性
|
|
|
- watch: {}, // 侦听器(扩展的计算属性)
|
|
|
- components: { Table }, // 注册局部组件
|
|
|
- methods: {
|
|
|
- /**
|
|
|
- * @description:表单查询方法
|
|
|
- */
|
|
|
- handleSearch() {
|
|
|
- this.$refs.myTable.handleSearchClick();
|
|
|
+ /**
|
|
|
+ * @description:导入方法
|
|
|
+ */
|
|
|
+ handleImport() {
|
|
|
+ const vm = this;
|
|
|
+ const layer = this.$dgLayer({
|
|
|
+ title: '导入',
|
|
|
+ content: importFile,
|
|
|
+ props: {
|
|
|
+ temp: 'apply',
|
|
|
+ action: appImportUrl
|
|
|
},
|
|
|
- /**
|
|
|
- * 重置
|
|
|
- */
|
|
|
- handleReset() {
|
|
|
- for (const key in this.form) {
|
|
|
- this.form[key].value = "";
|
|
|
- }
|
|
|
+ on: {
|
|
|
+ success(params) {
|
|
|
+ layer.close(layer.dialogIndex);
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ vm.handleSearch();
|
|
|
+ layer.close(layer.dialogIndex);
|
|
|
+ }
|
|
|
},
|
|
|
- /**
|
|
|
- * @description:导入方法
|
|
|
- */
|
|
|
- handleImport() {
|
|
|
- const vm = this;
|
|
|
- const layer = this.$dgLayer({
|
|
|
- title: "导入",
|
|
|
- content: importFile,
|
|
|
- props: {
|
|
|
- temp: "apply",
|
|
|
- action: appImportUrl
|
|
|
- },
|
|
|
- on: {
|
|
|
- success(params) {
|
|
|
- layer.close(layer.dialogIndex);
|
|
|
- },
|
|
|
- close() {
|
|
|
- vm.handleSearch();
|
|
|
- layer.close(layer.dialogIndex);
|
|
|
- }
|
|
|
- },
|
|
|
- cancel: function (index, layero) {
|
|
|
- // 关闭对应弹窗的ID
|
|
|
- layer.close(index);
|
|
|
- return false;
|
|
|
- },
|
|
|
- area: ["550px", "500px"]
|
|
|
- });
|
|
|
+ cancel: function (index, layero) {
|
|
|
+ // 关闭对应弹窗的ID
|
|
|
+ layer.close(index);
|
|
|
+ return false;
|
|
|
},
|
|
|
- /**
|
|
|
- * @description:同步方法,假同步
|
|
|
- */
|
|
|
- handleSynchro() {
|
|
|
- appSync().then((res) => {
|
|
|
- this.$message.success("同步中,若数据量大,可能会存在延迟,请稍后自行刷新!");
|
|
|
- this.handleSearch();
|
|
|
- });
|
|
|
+ area: ['550px', '500px']
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description:同步方法,假同步
|
|
|
+ */
|
|
|
+ handleSynchro() {
|
|
|
+ appSync().then((res) => {
|
|
|
+ this.$message.success('同步中,若数据量大,可能会存在延迟,请稍后自行刷新!');
|
|
|
+ this.handleSearch();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description:详情
|
|
|
+ */
|
|
|
+ async handleViewDetail(row) {
|
|
|
+ const detailInfo = await this.getDetail(row.id);
|
|
|
+ this.$dgLayer({
|
|
|
+ title: '详情',
|
|
|
+ content: FormDetail,
|
|
|
+ props: {
|
|
|
+ detailInfo,
|
|
|
+ config: appForm,
|
|
|
+ labelWidth: '180px'
|
|
|
},
|
|
|
- /**
|
|
|
- * @description:详情
|
|
|
- */
|
|
|
- handleViewDetail(row) {
|
|
|
- const layer = this.$dgLayer({
|
|
|
- title: "详情",
|
|
|
- shade: [0.4, "#FFF"],
|
|
|
- content: detail,
|
|
|
- props: {
|
|
|
- id: row.id,
|
|
|
- isDetail: true
|
|
|
- },
|
|
|
- on: {
|
|
|
- success() {
|
|
|
- layer.close(layer.dialogIndex);
|
|
|
- }
|
|
|
- },
|
|
|
- area: ["800px", "450px"]
|
|
|
- });
|
|
|
- }
|
|
|
+ area: ['800px', '600px']
|
|
|
+ });
|
|
|
},
|
|
|
- created() {}, // 组件创建完成后
|
|
|
- mounted() {} // 组件挂载完成后
|
|
|
+ /**
|
|
|
+ * 获取详情
|
|
|
+ */
|
|
|
+ getDetail(id) {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ appRestApi.detail(id).then((res) => {
|
|
|
+ resolve(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {}, // 组件创建完成后
|
|
|
+ mounted() {} // 组件挂载完成后
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-@import "../index.scss";
|
|
|
+@import '../index.scss';
|
|
|
</style>
|