+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ this.$emit(
+ 'update:selectionShow',
+ !this.selectionShow,
+ )
+ }
+ "
+ >复选框
+
+
+ {
+ this.$emit(
+ 'update:indexNumShow',
+ !this.indexNumShow,
+ )
+ }
+ "
+ >序号
+
+
+ {
+ this.$emit(
+ 'update:handleShow',
+ !this.handleShow,
+ )
+ }
+ "
+ >操作
+
+
+
+
+ {{ item.t_label }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index ae36024..d75b67b 100644
--- a/src/main.js
+++ b/src/main.js
@@ -18,7 +18,7 @@ import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/bonus";
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, indexContinuation } from "@/utils/bonus";
// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
@@ -37,6 +37,10 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
+// 表格组件
+import TableModel from '@/components/TableModel'
+// 弹框组件
+import DialogModel from '@/components/DialogModel'
// 全局方法挂载
Vue.prototype.getDicts = getDicts
@@ -48,6 +52,8 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
+Vue.prototype.indexContinuation = indexContinuation
+
// 全局组件挂载
Vue.component('DictTag', DictTag)
@@ -57,6 +63,8 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
+Vue.component('TableModel', TableModel)
+Vue.component('DialogModel', DialogModel)
Vue.use(directive)
Vue.use(plugins)
diff --git a/src/utils/bonus.js b/src/utils/bonus.js
index 723754c..53cc51f 100644
--- a/src/utils/bonus.js
+++ b/src/utils/bonus.js
@@ -234,3 +234,8 @@ export function tansParams(params) {
export function blobValidate(data) {
return data.type !== 'application/json'
}
+
+// 解决表格翻页时 index 索引延续问题
+export function indexContinuation(num, size) {
+ return (num - 1) * size + 1
+}
diff --git a/src/utils/configure.js b/src/utils/configure.js
index b0396c2..3aa6e31 100644
--- a/src/utils/configure.js
+++ b/src/utils/configure.js
@@ -43,9 +43,9 @@ const CONFIG = {
IS_CODE_LOGIN: LOGIN_CONFIG.CODE_EMAIL_LOGIN || LOGIN_CONFIG.CODE_PHONE_LOGIN, // 是否开启短信登录
// 数据设置
dataSettings: {
- integrityCheck: DATA_SETTINGS.OPEN, // 数据完整性校验(true:开启,false:关闭)
- encryptRequest: DATA_SETTINGS.OPEN, // 数据传输加密(true:开启,false:关闭)
- encryptResponse: DATA_SETTINGS.OPEN // 数据返回解密(true:开启,false:关闭)
+ integrityCheck: DATA_SETTINGS.CLOSE, // 数据完整性校验(true:开启,false:关闭)
+ encryptRequest: DATA_SETTINGS.CLOSE, // 数据传输加密(true:开启,false:关闭)
+ encryptResponse: DATA_SETTINGS.CLOSE // 数据返回解密(true:开启,false:关闭)
}
}
diff --git a/src/views/base/mixins/common.js b/src/views/base/mixins/common.js
new file mode 100644
index 0000000..1d71899
--- /dev/null
+++ b/src/views/base/mixins/common.js
@@ -0,0 +1,73 @@
+import { param2Obj } from '@/utils'
+
+export const commonMixin = {
+ data() {
+ return {
+ // 修改时的数据源
+ editParams: null,
+ }
+ },
+ methods: {
+ /** 新建 */
+ handleAddData() {
+ this.editParams = null
+ this.dialogConfig.outerTitle = this.addDialogTitle
+ this.dialogConfig.outerVisible = true
+ },
+ /** 删除 */
+ handleDeleteData(id, method) {
+ this.$modal.confirm('是否确定删除').then(() => {
+ method(id).then(res => {
+ this.$modal.msgSuccess('操作成功!')
+ this.$refs.tableRef.getTableList()
+ }).catch(err => {})
+ })
+ },
+ /** 编辑 */
+ handleEditData(data) {
+ this.editParams = data
+ this.dialogConfig.outerTitle = this.editDialogTitle
+ this.dialogConfig.outerVisible = true
+ },
+ /** 导入数据 */
+ handleImportData() {
+ console.log('导入--')
+ },
+ /** 导出数据 */
+ handleExportData(data, url, fileName, queryParams) {
+ this.download(
+ url,
+ {
+ ...queryParams,
+ dataCondition: data
+ },
+ `${fileName}_${new Date().getTime()}.xlsx`,
+ )
+ },
+ /** 关闭外侧弹框 */
+ closeDialogOuter() {
+ this.dialogConfig.outerVisible = false
+ },
+ /** 关闭内侧弹框 */
+ closeDialogInner() {
+ this.dialogConfig.innerVisible = false
+ },
+
+ /** 关闭弹框 由表单组件通知父组件关闭弹框的自定义事件 */
+ closeDialog(type) {
+ this.dialogConfig.outerVisible = false
+ if(type) {
+ this.$refs.tableRef.getTableList()
+ }
+ },
+ /** 手机号脱密处理 */
+ phoneCrypto(phoneNumber) {
+ let reg = /^(1[3-9][0-9])\d{4}(\d{4}$)/
+ let isMobile = reg.test(phoneNumber)
+ if (isMobile) {
+ return phoneNumber.replace(reg, "$1****$2")
+ }
+ return phoneNumber
+ }
+ }
+}
diff --git a/src/views/base/proj/components/form-project.vue b/src/views/base/proj/components/form-project.vue
new file mode 100644
index 0000000..20f0eab
--- /dev/null
+++ b/src/views/base/proj/components/form-project.vue
@@ -0,0 +1,384 @@
+