diff --git a/base-vue/package.json b/base-vue/package.json index 58fe1cb..9d413b3 100644 --- a/base-vue/package.json +++ b/base-vue/package.json @@ -22,7 +22,7 @@ "bpmn-js-properties-panel": "^0.33.0", "camunda-bpmn-moddle": "^4.3.0", "echarts": "^5.4.2", - "element-ui": "2.8.2", + "element-ui": "^2.15.14", "gulp": "4.0.2", "gulp-concat": "2.6.1", "gulp-load-plugins": "2.0.5", @@ -53,7 +53,7 @@ "babel-preset-stage-2": "6.22.0", "babel-register": "6.22.0", "chalk": "2.3.0", - "chromedriver": "2.27.2", + "chromedriver": "^2.27.2", "copy-webpack-plugin": "4.0.1", "cross-spawn": "5.0.1", "css-loader": "0.28.0", diff --git a/base-vue/src/main.js b/base-vue/src/main.js index f76a67b..6381bfe 100644 --- a/base-vue/src/main.js +++ b/base-vue/src/main.js @@ -3,9 +3,9 @@ import App from '@/App' import router from '@/router' // api: https://github.com/vuejs/vue-router import store from '@/store' // api: https://github.com/vuejs/vuex import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie -import '@/element-ui' // api: https://github.com/ElemeFE/element +import ElementUI from 'element-ui' import '@/icons' // api: http://www.iconfont.cn/ -import '@/element-ui-theme' +import 'element-ui/lib/theme-chalk/index.css' import '@/assets/scss/index.scss' import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios import { isAuth } from '@/utils' @@ -23,6 +23,7 @@ import './style/bpmn-custom-color.css' // 导入自定义的样式文件 Vue.prototype.$echarts = echarts; Vue.use(VueCookie) +Vue.use(ElementUI) Vue.config.productionTip = false // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock diff --git a/base-vue/src/views/common/home.vue b/base-vue/src/views/common/home.vue index e2dfafa..c738ff4 100644 --- a/base-vue/src/views/common/home.vue +++ b/base-vue/src/views/common/home.vue @@ -101,6 +101,8 @@ export default { marker: null, keyword: "", local: null, + dataListLoading: false, + dataListSelections: [], dataList:[] }; }, @@ -115,6 +117,10 @@ export default { this.dataList = data.notices } }) + }, + // 多选 + selectionChangeHandle (val) { + this.dataListSelections = val } }, mounted(){ diff --git a/base-vue/src/views/modules/contract/contract.vue b/base-vue/src/views/modules/contract/contract.vue index c4beeda..3fb9bdd 100644 --- a/base-vue/src/views/modules/contract/contract.vue +++ b/base-vue/src/views/modules/contract/contract.vue @@ -98,8 +98,8 @@ width="150" label="操作"> @@ -114,14 +114,17 @@ + \ No newline at end of file diff --git a/base-vue/src/views/modules/contract/temp-add.vue b/base-vue/src/views/modules/contract/temp-add.vue new file mode 100644 index 0000000..d056128 --- /dev/null +++ b/base-vue/src/views/modules/contract/temp-add.vue @@ -0,0 +1,117 @@ + + + \ No newline at end of file diff --git a/base-vue/src/views/modules/sys/dept-add-or-update.vue b/base-vue/src/views/modules/sys/dept-add-or-update.vue index 9071859..0fafacb 100644 --- a/base-vue/src/views/modules/sys/dept-add-or-update.vue +++ b/base-vue/src/views/modules/sys/dept-add-or-update.vue @@ -21,9 +21,9 @@ - - - + + + @@ -68,10 +68,8 @@ name: null, deptSort: 999, isTop: '1', - isUsed: true - // ext_id: null, - // sub_count: 0, - // pid: null + isUsed: true, + pid: null }, depts: [], dataRule: { @@ -88,20 +86,20 @@ Treeselect }, methods: { + handleChange () { + this.$forceUpdate() + }, init (row) { this.visible = true this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (row) { this.dataForm = {...row} - // if (this.dataForm.pid !== null) { - // this.dataForm.isTop = '0' - // } else { - // this.dataForm.isTop = '1' - // } - if (this.dataForm.pid != null) { + if (this.dataForm.pid !== null) { + this.dataForm.isTop = '0' this.getSupDepts(this.dataForm.pid) } else { + this.dataForm.isTop = '1' this.getDepts() } } @@ -124,7 +122,7 @@ if (data.children) { this.buildDepts(data.children) } - if (data.has_children && !data.children) { + if (data.hasChildren && !data.children) { data.children = null } }) @@ -133,25 +131,33 @@ this.$http({ url: this.$http.adornUrl('/api/dept/vo'), method: 'get', - params: this.$http.adornParams({is_used: true}) + params: this.$http.adornParams({isUsed: true}) }).then(({data}) => { if (data && data.code === 200) { this.depts = data.content.map(function(obj) { - if (obj.has_children) { + if (obj.hasChildren) { obj.children = null } return obj }) + console.log(this.depts) } }) }, + normalizer(node) { + return { + id: node.deptId, + label: node.name, + children: node.children + } + }, // 获取弹窗内部门数据 loadDepts({ action, parentNode, callback }) { if (action === LOAD_CHILDREN_OPTIONS) { this.$http({ url: this.$http.adornUrl('/api/dept/vo'), method: 'get', - params: this.$http.adornParams({is_used: true, pid: parentNode.dept_id}) + params: this.$http.adornParams({isUsed: true, pid: parentNode.deptId}) }).then(({res}) => { parentNode.children = res.content.map(function(obj) { obj.children = null diff --git a/base-vue/src/views/modules/sys/dept.vue b/base-vue/src/views/modules/sys/dept.vue index 49b6f11..5b12a1c 100644 --- a/base-vue/src/views/modules/sys/dept.vue +++ b/base-vue/src/views/modules/sys/dept.vue @@ -19,7 +19,7 @@ 查询 新增 - 批量删除 + 批量删除 @@ -104,8 +104,8 @@ export default { data () { return { dataForm: { - name: '', - isUsed: '' + name: null, + isUsed: null }, enabledTypeOptions: [ { key: true, displayName: '启用' }, @@ -136,7 +136,7 @@ export default { params: this.$http.adornParams({ 'page': this.pageIndex, 'size': this.pageSize, - 'sort': 'id,desc', + 'sort': 'create_time', 'name': this.dataForm.name, 'isUsed': this.dataForm.isUsed }) @@ -174,11 +174,11 @@ export default { }) }, // 删除 - deleteHandle (id) { + deleteHandle (type, id) { var ids = id ? [id] : this.dataListSelections.map(item => { return item.deptId }) - this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { + this.$confirm(type === 1 ? `确认删除选中的${this.dataListSelections.length}条数据?` : '确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' @@ -186,7 +186,7 @@ export default { this.$http({ url: this.$http.adornUrl('/api/dept'), method: 'DELETE', - data: this.$http.adornData(ids) + data: ids }).then(({data}) => { if (data && data.code === 200) { this.$message({