|
@@ -50,44 +50,6 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="项目经理" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
- v-model="formSearch.pmId"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- filterable
|
|
|
|
- clearable
|
|
|
|
- remote
|
|
|
|
- :remote-method="searchPmList"
|
|
|
|
- >
|
|
|
|
- <el-option label="请选择" value=""></el-option>
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in pmList"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
- :key="item.id"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item label="印刷供应商" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
- v-model="formSearch.supplierId"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- filterable
|
|
|
|
- clearable
|
|
|
|
- remote
|
|
|
|
- :remote-method="searchSupplierList"
|
|
|
|
- >
|
|
|
|
- <el-option label="请选择" value=""></el-option>
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in supplierList"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
- :key="item.id"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
<el-form-item class="pull-right">
|
|
<el-form-item class="pull-right">
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
@@ -107,52 +69,49 @@
|
|
style="width:100%;"
|
|
style="width:100%;"
|
|
border
|
|
border
|
|
>
|
|
>
|
|
- <el-table-column width="220" label="学校名称" prop="orgName" />
|
|
|
|
- <el-table-column label="考试名称" prop="examName" />
|
|
|
|
- <el-table-column width="200" label="印刷供应商" prop="supplierName" />
|
|
|
|
- <el-table-column width="150" label="项目经理" prop="pmName" />
|
|
|
|
-
|
|
|
|
- <el-table-column width="120" label="项目统计">
|
|
|
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
+ <el-table-column label="类别" prop="typeName" />
|
|
|
|
+ <el-table-column label="上传">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="default"
|
|
|
|
+ icon="el-icon-upload"
|
|
|
|
+ @click="upload(scope.row);"
|
|
|
|
+ >上传
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="下载">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <a
|
|
|
|
- href="javascript:void(0)"
|
|
|
|
- @click="gotoProjectStatistic(scope.row);"
|
|
|
|
- >查看
|
|
|
|
- </a>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="default"
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ @click="download(scope.row);"
|
|
|
|
+ >下载
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-
|
|
|
|
- <el-table-column width="120" label="操作" :context="_self">
|
|
|
|
|
|
+ <el-table-column label="预览">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
- type="primary"
|
|
|
|
- icon="el-icon-setting"
|
|
|
|
- @click="editProjectSetting(scope.row);"
|
|
|
|
- :disabled="!hasPermit"
|
|
|
|
- >项目设置
|
|
|
|
|
|
+ type="default"
|
|
|
|
+ icon="el-icon-document"
|
|
|
|
+ @click="preview(scope.row);"
|
|
|
|
+ >预览
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
- <!-- 分页 -->
|
|
|
|
- <div class="page pull-left">
|
|
|
|
- <el-pagination
|
|
|
|
- @current-change="handlePager"
|
|
|
|
- :current-page="formSearch.pageNo"
|
|
|
|
- :page-size="formSearch.pageSize"
|
|
|
|
- :total="totalElements"
|
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
- ></el-pagination>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { print_api, core_api, userRole } from "../constants/constants.js";
|
|
|
|
|
|
+import { print_api, userRole } from "../constants/constants.js";
|
|
import { mapState } from "vuex";
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -160,30 +119,18 @@ export default {
|
|
return {
|
|
return {
|
|
formSearch: {
|
|
formSearch: {
|
|
orgId: "",
|
|
orgId: "",
|
|
- examId: "",
|
|
|
|
- pmId: "",
|
|
|
|
- supplierId: "",
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
|
|
+ examId: ""
|
|
},
|
|
},
|
|
curUserRole: userRole,
|
|
curUserRole: userRole,
|
|
hasPermit: false,
|
|
hasPermit: false,
|
|
- totalElements: 0,
|
|
|
|
loading: false,
|
|
loading: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
orgList: [],
|
|
orgList: [],
|
|
examList: [],
|
|
examList: [],
|
|
- pmList: [],
|
|
|
|
- supplierList: [],
|
|
|
|
rules: {}
|
|
rules: {}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handlePager(current) {
|
|
|
|
- /* 处理分页 */
|
|
|
|
- this.formSearch.pageNo = current;
|
|
|
|
- this.searchRecords();
|
|
|
|
- },
|
|
|
|
searchRecords() {
|
|
searchRecords() {
|
|
/* 查询记录列表 */
|
|
/* 查询记录列表 */
|
|
let orgId = this.formSearch.orgId;
|
|
let orgId = this.formSearch.orgId;
|
|
@@ -205,11 +152,10 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- let url = print_api + "/printing/project/list";
|
|
|
|
|
|
+ let url = print_api + "/project/template/" + orgId + "/" + examId;
|
|
this.$http.post(url, this.formSearch).then(
|
|
this.$http.post(url, this.formSearch).then(
|
|
response => {
|
|
response => {
|
|
- this.tableData = response.data.content;
|
|
|
|
- this.totalElements = response.data.totalElements;
|
|
|
|
|
|
+ this.tableData = response.data;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
@@ -230,42 +176,29 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- searchPmList(query) {
|
|
|
|
- /* 查询项目经理列表 */
|
|
|
|
- this.pmList = [];
|
|
|
|
- let url =
|
|
|
|
- core_api + "/user/query?rootOrgCode=qmth&roleCode=PRINT_PROJECT_LEADER";
|
|
|
|
-
|
|
|
|
- if (!this.isEmptyStr(query)) {
|
|
|
|
- url += "&name=" + query;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.$http.get(url).then(response => {
|
|
|
|
- this.pmList = response.data;
|
|
|
|
|
|
+ upload(row) {
|
|
|
|
+ /* 上传模板 */
|
|
|
|
+ console.log(row);
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "Todo...",
|
|
|
|
+ type: "warning"
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- searchSupplierList(query) {
|
|
|
|
- /* 查询印刷供应商列表 */
|
|
|
|
- this.supplierList = [];
|
|
|
|
- let url =
|
|
|
|
- core_api + "/user/query?rootOrgCode=qmth-print&roleCode=PRINT_SUPPLIER";
|
|
|
|
-
|
|
|
|
- if (!this.isEmptyStr(query)) {
|
|
|
|
- url += "&name=" + query;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.$http.get(url).then(response => {
|
|
|
|
- this.supplierList = response.data;
|
|
|
|
|
|
+ preview(row) {
|
|
|
|
+ /* 预览模板 */
|
|
|
|
+ console.log(row);
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "Todo...",
|
|
|
|
+ type: "warning"
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- gotoProjectStatistic(row) {
|
|
|
|
- /* 查看项目统计 */
|
|
|
|
- let url = "/print/project/statistic/" + row.orgId + "/" + row.examId;
|
|
|
|
- this.$router.push({ path: url });
|
|
|
|
- },
|
|
|
|
- editProjectSetting(row) {
|
|
|
|
- /* 项目设置 */
|
|
|
|
|
|
+ download(row) {
|
|
|
|
+ /* 下载模板 */
|
|
console.log(row);
|
|
console.log(row);
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "Todo...",
|
|
|
|
+ type: "warning"
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -276,16 +209,8 @@ export default {
|
|
|
|
|
|
this.loadUserRole(this.user);
|
|
this.loadUserRole(this.user);
|
|
|
|
|
|
- if (this.curUserRole.isSuperLeader) {
|
|
|
|
|
|
+ if (this.curUserRole.isSuperLeader || this.curUserRole.isPM) {
|
|
this.hasPermit = true;
|
|
this.hasPermit = true;
|
|
- // this.searchPmList();
|
|
|
|
- // this.searchSupplierList();
|
|
|
|
- } else if (this.curUserRole.isPM) {
|
|
|
|
- this.hasPermit = true;
|
|
|
|
- //this.loadPmInfo(this.user);
|
|
|
|
- } else if (this.curUserRole.isSupplier) {
|
|
|
|
- this.hasPermit = false;
|
|
|
|
- //this.loadSupplierInfo(this.user);
|
|
|
|
} else {
|
|
} else {
|
|
this.hasPermit = false;
|
|
this.hasPermit = false;
|
|
}
|
|
}
|