|
@@ -6,18 +6,18 @@
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
|
|
<el-form-item label="审批状态" prop="approveStatus">
|
|
|
<el-select
|
|
|
- v-model="queryParams.approveStatus"
|
|
|
- placeholder="请选择审批状态"
|
|
|
- clearable
|
|
|
- style="width: 240px"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in approveStatusOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ v-model="queryParams.approveStatus"
|
|
|
+ placeholder="请选择审批状态"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in approveStatusOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审批结果" prop="approveResult">
|
|
|
<el-select
|
|
@@ -99,7 +99,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { debounce } from 'lodash'
|
|
|
+import {debounce} from 'lodash'
|
|
|
+
|
|
|
export default {
|
|
|
name: "User",
|
|
|
data() {
|
|
@@ -143,7 +144,7 @@ export default {
|
|
|
approveStatus: undefined,
|
|
|
approveResult: undefined
|
|
|
},
|
|
|
- edit:false
|
|
|
+ edit: false
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -164,7 +165,7 @@ export default {
|
|
|
belongTo = "新增"
|
|
|
} else if (cellValue == "1") {
|
|
|
belongTo = "修改"
|
|
|
- }else if (cellValue == "2") {
|
|
|
+ } else if (cellValue == "2") {
|
|
|
belongTo = "删除"
|
|
|
}
|
|
|
}
|
|
@@ -193,15 +194,25 @@ export default {
|
|
|
return belongTo
|
|
|
},
|
|
|
/** 查询用户列表 */
|
|
|
- getList(){
|
|
|
+ async getList() {
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+
|
|
|
this.loading = true;
|
|
|
var searchParams = {
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
approveStatus: this.queryParams.approveStatus,
|
|
|
- approveResult: this.queryParams.approveResult
|
|
|
+ approveResult: this.queryParams.approveResult,
|
|
|
+ sysTime: sysTime,
|
|
|
+ lk: lk
|
|
|
}
|
|
|
- this.$axios.get('/sysApproveController/getAll',
|
|
|
+ await this.$axios.get('/sysApproveController/getAll',
|
|
|
{params: searchParams}).then((res) => {
|
|
|
this.approveList = res.data.records
|
|
|
this.total = res.data.total
|
|
@@ -218,18 +229,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
- handleQuery:debounce(function(){
|
|
|
+ handleQuery: debounce(function () {
|
|
|
this.getList()
|
|
|
- },1000),
|
|
|
- handleApprove(row,val){
|
|
|
- let tips=''
|
|
|
- if (val==0){
|
|
|
+ }, 1000),
|
|
|
+ handleApprove(row, val) {
|
|
|
+ let tips = ''
|
|
|
+ if (val == 0) {
|
|
|
tips = '【通过】'
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
tips = '【未通过】'
|
|
|
}
|
|
|
- this.$confirm('确认审批结果'+tips+'?', '提示', {
|
|
|
+ this.$confirm('确认审批结果' + tips + '?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
@@ -240,21 +250,31 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
- submitApprove:debounce(function(row){
|
|
|
- this.$axios.post('/sysApproveController/submitApprove', row).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.$message.success('审批成功')
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- if (res.code == 1) {
|
|
|
- this.$message.error(res.data)
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- // this.$message.error(error)
|
|
|
+ submitApprove: debounce(async function (row) {
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+
|
|
|
+ row.sysTime = sysTime
|
|
|
+ row.lk = lk
|
|
|
+ await this.$axios.post('/sysApproveController/submitApprove', row).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.$message.success('审批成功')
|
|
|
this.getList();
|
|
|
- })
|
|
|
- },1000)
|
|
|
+ }
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$message.error(res.data)
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ // this.$message.error(error)
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
};
|
|
|
</script>
|